Skip to content

thv llm: tool adapter registry and per-tool implementations #5030

Closed

Description

@yrobla

Context

Part of #5016 (RFC: stacklok/rfcs#70). Depends on #5028 (token lifecycle) and #5029 (proxy).

Scope

Registry interface:

  • Detect() bool, Apply(config) error, Revert() error interface for tool adapters
  • Auto-discovery registry — adding a new tool requires only implementing the interface and registering; no changes to setup/teardown orchestration

Token helper (direct) mode tools:

  • Claude Code — patches apiKeyHelper and base URL in ~/.claude/settings.json
  • Gemini CLI — patches token command and base URL in Gemini CLI's config

Proxy mode tools:

  • Cursor — patches base URL and placeholder API key in Cursor's config
  • VS Code (GitHub Copilot) — patches base URL and placeholder API key in VS Code's settings
  • Apple Xcode — patches base URL and placeholder API key in Xcode's config

Acceptance Criteria

  • AT: Claude Code is configured as a token helper tool — setup patches apiKeyHelper and base URL in ~/.claude/settings.json
  • AT: Gemini CLI is configured as a token helper tool — setup patches token command and base URL in Gemini CLI's config
  • AT: Cursor is configured as a proxy-mode tool — setup patches base URL and placeholder API key in Cursor's config
  • AT: VS Code (GitHub Copilot) is configured as a proxy-mode tool — setup patches base URL and placeholder API key in VS Code's settings
  • AT: Apple Xcode is configured as a proxy-mode tool — setup patches base URL and placeholder API key in Xcode's config
  • Adding a new tool requires only implementing Detect/Apply/Revert and registering — no changes to orchestration, proxy, or token source

Dependencies

References

Activity

  1. added
    enhancement
    go
    cli
    llm gateway
    on Apr 23, 2026
  2. added 3 commits that reference this issue on Apr 27, 2026
    a759f3a
    dfb607d
    6de00da
  3. added a commit that references this issue on Apr 28, 2026
    60ccd8f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clienhancementgollm gateway

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions