Skip to content

Fix: strip profile prefix in OpenRouterProvider::set_model for direct…#360

Closed
akvarel wants to merge 1 commit into
1jehuang:masterfrom
akvarel:fix/strip-profile-prefix-set-model
Closed

Fix: strip profile prefix in OpenRouterProvider::set_model for direct…#360
akvarel wants to merge 1 commit into
1jehuang:masterfrom
akvarel:fix/strip-profile-prefix-set-model

Conversation

@akvarel

@akvarel akvarel commented Jun 11, 2026

Copy link
Copy Markdown

… profiles

When a switch spec like 'deepseek:deepseek-v4-flash' (produced by model_switch_request_for_session_route or fork_model_switch_request) is passed directly to OpenRouterProvider::set_model on a direct OpenAI-compatible profile (supports_provider_features=false), it was stored as-is, causing the API request to send 'model: deepseek:deepseek-v4-flash' which the DeepSeek API rejects.

Now detect and strip the known {profile_id}: prefix when the OpenRouterProvider has a profile_id set, so the bare model name is used in API requests.

… profiles

When a switch spec like 'deepseek:deepseek-v4-flash' (produced by
model_switch_request_for_session_route or fork_model_switch_request)
is passed directly to OpenRouterProvider::set_model on a direct
OpenAI-compatible profile (supports_provider_features=false), it was
stored as-is, causing the API request to send 'model: deepseek:deepseek-v4-flash'
which the DeepSeek API rejects.

Now detect and strip the known {profile_id}: prefix when the
OpenRouterProvider has a profile_id set, so the bare model name
is used in API requests.
@1jehuang

Copy link
Copy Markdown
Owner

Thanks! This repo no longer accepts external PRs, but the underlying problem is real - it's now tracked in #363 (with credit to this PR). Closing.

@1jehuang 1jehuang closed this Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage:converted PR triage: worth tracking as an issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants