Skip to content

[Bug]: Fast mode on custom Claude-provider models is dropped before the Agent SDK query #16755

Description

@diastidean

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. On a Claude provider instance, add a custom model (for example a model served through an Anthropic-compatible proxy) and enable the Fast mode capability in Settings → Models.
  2. Select that custom model in a thread and turn the per-thread Fast toggle on.
  3. Send a prompt and inspect the Agent SDK query options or the outgoing request.

Expected behavior

The thread's Fast choice should reach the Claude Agent SDK as settings.fastMode: true, as it does for bundled models that expose the fast-mode option.

Actual behavior

From source tracing on main, the selection is dropped at the provider boundary:

  • The custom capability is saved and offered per thread (apps/web/src/components/settings/customModelEditor.logic.ts, apps/web/src/components/chat/TraitsPicker.tsx), and the composer dispatches the selected model with its options.
  • makeClaudeQueryOptions in apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts calls compileClaudeModelSelection(input.modelSelection) without a catalog argument, so it falls back to BUNDLED_CLAUDE_MODEL_CATALOG.
  • compileClaudeModelSelection (apps/server/src/claudeModelOptions.ts) only emits fastMode when that catalog's capabilities for the model include the boolean fastMode descriptor. Custom models aren't in the bundled catalog, so no fastMode setting is produced, while the custom slug is still passed as options.model.
  • scopeClaudeModelCatalog in apps/server/src/provider/ClaudeModelCatalog.ts would include custom-model descriptors, but it appears to be used only by ClaudeTextGeneration.ts, not the adapter.

I have not captured a live request; this is from reading the code path.

Impact

Minor bug or occasional failure

Version or commit

main @ 8ddf200

Environment

macOS, T3 Code desktop, Claude provider with custom models routed through an Anthropic-compatible proxy.

Workaround

Configure a separate custom model ID that encodes the fast variant on the proxy side, instead of using the Fast toggle.

Possible fix

Compile the selection against the provider instance's scoped catalog (the one including custom-model capabilities) in makeClaudeQueryOptions. Separately, whether Claude Code forwards fast mode for a non-Claude model ID would need confirming once settings.fastMode is passed.

Activity

  1. juliusmarminge commented on Oct 7, 2026

    @juliusmarminge
    Member

    Note

    Grok responding on behalf of Julius.

    Thanks for the careful trace! This is the same root cause as #16672: makeClaudeQueryOptions in ClaudeAdapterV2 compiles the selection against the bundled catalog, so every option declared on a custom Claude model (effort, thinking, and fast mode alike) gets dropped. Closing this as a duplicate so the discussion stays in one place.

    The open fix is #16583, which passes the driver's live catalog (with the instance's custom models scoped in) to the adapter, so a custom model's fastMode descriptor should then produce settings.fastMode. If fast mode is still dropped once that lands, please reopen or comment on #16672.

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

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions