fix: prefix custom-endpoint model refs with endpoint/ when model ID contains slash#102
fix: prefix custom-endpoint model refs with endpoint/ when model ID contains slash#102usize wants to merge 1 commit intosallyom:mainfrom
Conversation
… ID contains slash (sallyom#93) When inferenceProvider is 'custom-endpoint', model IDs like 'google/gemma-4-26B-A4B-it' were passed through unprefixed because normalizeModelRef and normalizeProviderModelRef had an early return for IDs containing '/'. The gateway then parsed 'google/' as a provider prefix, routing to a nonexistent 'google' provider. Now both functions always prefix with 'endpoint/' for custom-endpoint configs, producing 'endpoint/google/gemma-4-26B-A4B-it'. The provider's own models[].id keeps the raw model ID for the vLLM API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Hi @usize — thanks for this PR and the well-written issue in #93. The bug report was excellent: clear repro steps, expected behavior, workaround, and environment details. That's a model for how to file an issue. The bug you identified was real — It looks like this was independently fixed in the main branch around April 7–8 (commits Given that, I think this PR can be closed unless there's something in your fix that the current code doesn't cover. If you see a gap I missed, please let me know! (Comment from Claude Code, under the supervision of Bill Murdock.) |
Summary
normalizeModelRefandnormalizeProviderModelRefink8s-helpers.tsto always prefix custom-endpoint model IDs withendpoint/, even when the model ID already contains a/(e.g.google/gemma-4-26B-A4B-it)Fixes #93
Test plan
npm run buildpassesnpm testpasses (280/280, including 3 new regression tests)Generated with agent.sh