Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Feature]: Switch between Claude Code-compatible providers within a thread #2365

Closedleynier(GitHub profile, opens in a new tab) opened this issue 2 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I am describing a concrete problem or use case, not just a vague idea.

Area

apps/server

Problem or use case

Claude Code can work with alternative Claude-compatible endpoints by setting environment variables such as ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY, and the ANTHROPIC_DEFAULT_*_MODEL aliases.

Some coding-model subscriptions expose Claude-compatible endpoints, for example Kimi, MiniMax, and Z.ai. These can be useful as Claude Code backends, but today T3 Code does not provide a first-class way to select one of these compatible providers for a Claude thread.

The main use case is not only starting a new thread with a different endpoint. I want to continue the same T3 Code conversation and switch between official Claude Code and a Claude-compatible provider while preserving the thread history as much as possible.

Proposed solution

Add support for Claude Code-compatible provider profiles under the existing Claude provider.

A profile would provide the environment needed to start Claude Code against a compatible endpoint:

  • base URL
  • auth token or API key
  • model mapping for Claude aliases:
    • haiku
    • sonnet
    • opus

Compatible provider models should appear as Claude model options rather than as separate agents. For example:

  • Kimi · Kimi K2.6
  • MiniMax · MiniMax M2.7
  • Z.ai · GLM 5.1
  • Z.ai · GLM 5 Turbo

When the selected model belongs to a compatible provider, T3 Code should start Claude Code with the matching environment variables.

When the user switches between official Claude and a compatible provider inside an existing thread, T3 Code should preserve the Claude resume/session cursor whenever possible. Since changing providers changes environment variables, the Claude SDK session may need to be restarted internally, but this should not create a new user-visible conversation.

Why this matters

Users with multiple coding-model subscriptions often want to choose the best backend for the current task without losing the thread context.

Example workflows:

  • start a thread with official Claude Code
  • switch to GLM, Kimi, or MiniMax for a specific turn
  • switch back to official Claude Code if the compatible provider has a limitation
  • continue using the same T3 Code conversation instead of manually copying context into a new thread

Without in-thread switching, compatible Claude endpoints are much less useful because the user has to split work across multiple conversations.

Smallest useful scope

A first version could support a small fixed set of known Claude-compatible providers instead of a fully generic plugin system.

For example:

  • Kimi
  • MiniMax
  • Z.ai

Each provider could expose only:

  • enable/disable
  • auth token or API key
  • read-only endpoint
  • read-only model mapping

The important part is preserving the Claude thread/resume state when switching between official Claude and one of these compatible providers.

Alternatives considered

  • Start a separate T3 Code thread for each provider. This works, but loses the main benefit of a persistent coding conversation.
  • Configure Claude Code externally with environment variables. This works for one provider at a time, but does not allow switching providers per T3 Code thread/model selection.
  • Build a fully generic custom provider/plugin system. That is more flexible, but likely much larger than the smallest useful version of this request.

Risks or tradeoffs

  • Switching providers may require restarting the Claude SDK session because the provider endpoint and credentials are environment variables.
  • Some compatible providers may return history blocks that another provider rejects on resume, such as provider-specific thinking blocks or signatures.
  • A small compatibility layer may be needed to sanitize or rewrite resume history during provider switches.
  • Secrets may initially be stored in local settings, consistent with existing local settings behavior.

Examples or references

Related issues:

This request is narrower than a full extension system, but adds one extra requirement not covered explicitly by those issues: switching between official Claude Code and Claude-compatible providers inside the same thread while preserving history.

Contribution

  • I would be open to helping implement this.
  1. yeah i was using z.ai and i couldn't configure in t3 codes, uninstalled

  2. From my testing with a custom openrouter claude code provider you were not able to switch back to Anthropic APIs after starting a thread in the openrouter one (some mismatches in how the api responses were constructed iirc which anthropic then declined) so i did not enable continuation across provider instances for Claude.

  3. juliusmarminge closed this

Sign in to join this conversation.