paseo icon indicating copy to clipboard operation
paseo copied to clipboard

Support defaultModel override in provider runtime settings for AWS Bedrock

Open skevetter opened this issue 7 months ago • 3 comments

Problem

When using Claude Code with AWS Bedrock (CLAUDE_CODE_USE_BEDROCK=1), the Paseo app (in daemon mode) always sends claude-opus-4-6 (the hardcoded isDefault: true model from claude-models.ts) to the Claude SDK. Bedrock rejects this with:

API Error (claude-opus-4-6): 400 The provided model identifier is invalid…
Try --model to switch to us.anthropic.claude-opus-4-1-20250805-v1:0.

Bedrock requires fully-versioned model IDs like anthropic.claude-sonnet-4-5-20250929-v1:0 or cross-region inference profile IDs like us.anthropic.claude-opus-4-1-20250805-v1:0.

Setting ANTHROPIC_MODEL in the provider env config does not help because the Paseo app explicitly passes the selected model ID to createAgent, which overrides the env var.

Root cause

In claude-agent.ts, base.model = this.config.model is set unconditionally when a model is present. Since the app always sends a model (the default), ANTHROPIC_MODEL is never consulted.

Proposed fix

Add a defaultModel field to ProviderRuntimeSettings (alongside command and env). When set, it overrides this.config.model before passing to the SDK. This lets Bedrock users configure the correct model ID in paseo.config.json without needing code changes or a wrapper script.

provider-launch-config.ts:

export const ProviderRuntimeSettingsSchema = z
  .object({
    command: ProviderCommandSchema.optional(),
    env: z.record(z.string()).optional(),
    defaultModel: z.string().optional(),  // add this
  })
  .strict();

claude-agent.ts (in buildQueryOptions):

if (this.config.model) {
  base.model = this.runtimeSettings?.defaultModel ?? this.config.model;
}

Config usage:

{
  "agents": {
    "providers": {
      "claude": {
        "env": {
          "CLAUDE_CODE_USE_BEDROCK": "1",
          "AWS_REGION": "us-west-2",
          "AWS_BEARER_TOKEN_BEDROCK": "..."
        },
        "defaultModel": "anthropic.claude-sonnet-4-5-20250929-v1:0"
      }
    }
  }
}

Happy to submit a PR with this change if the approach looks good.

skevetter avatar Apr 12 '26 08:04 skevetter

I'm running into this exact issue — using Claude Code with AWS Bedrock on an EC2 instance, and Paseo's hardcoded short model IDs override my Bedrock configuration. The fully-versioned inference profile IDs (e.g., us.anthropic.claude-opus-4-6-v1:0) are required for Bedrock, so Paseo is currently unusable with this setup. A defaultModel override would solve this. +1 for this feature.

dgallitelli avatar Apr 15 '26 11:04 dgallitelli

I have the same issue on v0.1.55, which makes Paseo unusable.

allenrchan avatar Apr 16 '26 10:04 allenrchan

Fixed. This report was reproduced on Paseo v0.1.55 on April 16, 2026. PR #979 merged on May 13 and changed the Claude model catalog to read concrete model IDs from ~/.claude/settings.json, including model, ANTHROPIC_MODEL, and the ANTHROPIC_DEFAULT_*_MODEL settings. That makes Bedrock inference-profile IDs selectable instead of forcing a hardcoded Anthropic model ID.

The fixing commit first shipped in Paseo v0.1.76, published May 15, after the affected v0.1.55 occurrence.

Please reopen this issue if you believe this closure is mistaken and can still reproduce the bug on the latest release.

paseo-bot avatar Jul 30 '26 17:07 paseo-bot