Skip to content

transformModelForProvider breaks Claude Haiku through Meridian proxy #3562

@Arthur-GH

Description

@Arthur-GH

Bug

When using the anthropic provider through a Meridian proxy (opencode-with-claude), the claudeVersionDot transformation in transformModelForProvider converts claude-haiku-4-5 to claude-haiku-4.5, which the proxy rejects as "Model not found".

Root cause

In src/shared/model-resolution-pipeline.ts, transformModelForProvider:

if (provider === "anthropic") {
    return claudeVersionDot(model);
}

The claudeVersionDot regex (/claude-(\w+)-(\d+)-(\d+)/g) converts hyphens to dots in the version number: claude-haiku-4-5claude-haiku-4.5.

Why it affects Haiku but not Opus/Sonnet

The Meridian proxy (/v1/models) lists:

  • claude-sonnet-4-6 — accepts both hyphen and dot notation
  • claude-opus-4-6 — accepts both hyphen and dot notation
  • claude-haiku-4-5-20251001 — requires date suffix, does NOT accept dot variant claude-haiku-4.5

So claudeVersionDot is technically wrong for all models through Meridian (all IDs use hyphens), but Opus and Sonnet happen to be lenient. Haiku is not.

Expected behavior

Model IDs should be sent to the provider as-is from the user config, or the transformation should be conditional on whether the provider is a proxy vs the real Anthropic API.

Reproduction

  1. Configure oh-my-openagent.json with any agent using anthropic/claude-haiku-4-5 as primary or fallback
  2. Use opencode-with-claude (Meridian proxy) as the anthropic provider
  3. Trigger that agent — fails with "Model not found: anthropic/claude-haiku-4.5"

Environment

  • oh-my-openagent: 3.17.4
  • OpenCode: 1.14.19
  • opencode-with-claude (Meridian proxy)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingconfirmedBug confirmed / reproducibletriage:externalExternal community contribution

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions