mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
e18e36625e
Models from the opencode provider (like claude-opus-4-6 and gpt-5.3-codex) have provider overrides in the models database that specify different npm packages than the provider's default. The code was ignoring these overrides and routing all models through openaicompat, causing "bad request" errors. Changes: - Added Provider field to modelsDBModel to capture model-specific overrides - Added ProviderNPM field to ModelInfo registry struct - Updated autoRouteProvider() to check for model-specific provider overrides - Fixed URL path handling for anthropic provider (strip /v1 suffix to avoid double /v1/v1 paths when using third-party anthropic-compatible APIs) Fixes routing for: - opencode/claude-opus-4-6 -> @ai-sdk/anthropic - opencode/gpt-5.3-codex -> @ai-sdk/openai