ultraworkers-claw-code/rust/crates
YeonGyu-Kim 0530c509a3 fix(api): route openai/ and gpt- model prefixes to OpenAi provider
metadata_for_model returned None for unknown models like openai/gpt-4.1-mini,
causing detect_provider_kind to fall through to auth-sniffer order. If
ANTHROPIC_API_KEY was set, the model was silently misrouted to Anthropic
and the user got a confusing 'missing Anthropic credentials' error.

Fix: add explicit prefix checks for 'openai/' and 'gpt-' in
metadata_for_model so the model name wins over env-var presence.

Regression test added: openai_namespaced_model_routes_to_openai_not_anthropic
- 'openai/gpt-4.1-mini' routes to OpenAi
- 'gpt-4o' routes to OpenAi

Reported and reproduced by gaebal-gajae against current main.
81 api lib tests passing, 0 failing.
2026-04-08 05:33:47 +09:00
..
api fix(api): route openai/ and gpt- model prefixes to OpenAi provider 2026-04-08 05:33:47 +09:00
commands feat: b5-markdown-fence — batch 5 wave 2 2026-04-07 15:19:45 +09:00
compat-harness wip: plugins progress 2026-04-01 07:09:06 +00:00
mock-anthropic-service feat(harness+usage): add auto_compact and token_cost parity scenarios 2026-04-03 22:41:42 +09:00
plugins Resolve claw-code main merge conflicts 2026-04-06 07:16:57 +00:00
runtime fix(dead-code): remove stale constants + dead function; add workspace_sessions_dir tests 2026-04-08 04:04:54 +09:00
rusty-claude-cli feat(worker_boot): emit .claw/worker-state.json on every status transition 2026-04-08 00:37:44 +09:00
telemetry feat: anthropic SDK header matching + request profile 2026-04-01 05:55:25 +00:00
tools test(tools): fill WorkerGet and error-path coverage gaps 2026-04-08 05:03:34 +09:00