Problem
.claude/agents/*.md files use model aliases (model: opus, model: sonnet, model: haiku) which claude-model-mapper.ts resolves to anthropic/claude-opus-4-6, etc. with a hardcoded ANTHROPIC_PREFIX.
Users who proxy Anthropic models through custom gateways (e.g., Kiro, LiteLLM) and don't have an anthropic provider configured get:
Model not found: anthropic/claude-opus-4-6
Root Cause
src/features/claude-code-agent-loader/claude-model-mapper.ts line 4-10:
const ANTHROPIC_PREFIX = "anthropic/"
const CLAUDE_CODE_ALIAS_MAP = new Map([
["sonnet", `${ANTHROPIC_PREFIX}claude-sonnet-4-6`],
["opus", `${ANTHROPIC_PREFIX}claude-opus-4-6`],
["haiku", `${ANTHROPIC_PREFIX}claude-haiku-4-5`],
])
No mechanism exists to override this prefix based on user configuration.
Fix
PR #3295 adds claude_code.anthropic_provider config option.
Environment
- oh-my-opencode: 3.16.0
- OpenCode with Kiro gateway provider
.claude/agents/ from a project with custom .claude/agents/ definitions
Problem
.claude/agents/*.mdfiles use model aliases (model: opus,model: sonnet,model: haiku) whichclaude-model-mapper.tsresolves toanthropic/claude-opus-4-6, etc. with a hardcodedANTHROPIC_PREFIX.Users who proxy Anthropic models through custom gateways (e.g., Kiro, LiteLLM) and don't have an
anthropicprovider configured get:Root Cause
src/features/claude-code-agent-loader/claude-model-mapper.tsline 4-10:No mechanism exists to override this prefix based on user configuration.
Fix
PR #3295 adds
claude_code.anthropic_providerconfig option.Environment
.claude/agents/from a project with custom .claude/agents/ definitions