fix(runtime-host-bridge): strip provider prefix from admission-probe model id - #150
fix(runtime-host-bridge): strip provider prefix from admission-probe model id#150thumay9700 wants to merge 1 commit into
Conversation
…model id Catalog model ids are provider-prefixed (deepseek/deepseek-v4-flash), but OpenAI-compatible vendors expect the bare upstream id (deepseek-v4-flash) on the wire. The chat-completions admission probe sent the prefixed form, so vendors returned 400 which was misclassified as vendor-down, leaving the endpoint permanently provider-unavailable and ineligible for benchmarking. Strip the leading provider segment before probing, mirroring resolveProviderLocalModelId in the OpenAI execution adapter.
|
Thank you for the contribution. Before this pull request can merge, every contributor must explicitly agree to the role-model CLA at https://raw.githubusercontent.com/try-works/role-model/cla-v1.0/cla/CLA-v1.0.md. Contributions are accepted only from individuals acting in their personal capacity. If an employer, client, company, or other entity has rights in the contribution, it must not be submitted here. To sign it, reply on this pull request with the exact sentence: I have read cla/CLA-v1.0.md and I hereby agree to the role-model Contributor License Agreement. You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Problem
Activating a DeepSeek endpoint (e.g.
deepseek/deepseek-v4-flash) leaves it permanently stuck athealthStatus: "provider-unavailable"with admissionreasonCode: "vendor-down". The endpoint is therefore ineligible for benchmarking and routing, so the provider is unusable.Root cause
The catalog stores provider-prefixed model ids (
deepseek/deepseek-v4-flash), but OpenAI-compatible vendors expect the bare upstream id on the wire (deepseek-v4-flash).The OpenAI execution adapter already handles this via
resolveProviderLocalModelId()(provider-openai/src/index.ts), but the chat-completions admission probe (remote-health-probe.ts) builds its request body directly and sent the rawcontext.modelId:DeepSeek rejects that with a 400:
{ "error": { "message": "The supported API model names are deepseek-v4-pro, deepseek-v4-flash, ... but you passed deepseek/deepseek-v4-flash.", ... } }The probe classifies any non-401/403/404 as
vendor-down, so a malformed model id was misreported as a vendor outage.Fix
Strip the leading provider segment before probing, mirroring the execution adapter:
and send
model: resolveProbeModelId(context.modelId).Test
The existing admission-probe test actually asserted the bug (it expected
deepseek/deepseek-v4-flashon the wire). Updated it to assert the bare upstream id, so it fails before this fix and passes after.corepack pnpm --filter @role-model-router/runtime-host-bridge vitest run test/remote-endpoint-admission-probe.test.ts src/remote-health-probe.test.ts→ 14/14 pass.