Skip to content

fix(proxy): preserve full model id for custom provider endpoints#1614

Open
xyz0z0 wants to merge 1 commit intomnfst:mainfrom
xyz0z0:fix/custom-provider-preserve-model-prefix
Open

fix(proxy): preserve full model id for custom provider endpoints#1614
xyz0z0 wants to merge 1 commit intomnfst:mainfrom
xyz0z0:fix/custom-provider-preserve-model-prefix

Conversation

@xyz0z0
Copy link
Copy Markdown

@xyz0z0 xyz0z0 commented Apr 19, 2026

Custom gateways configure upstream model names like z-ai/step-3.5-flash. stripModelPrefix was stripping the first path segment for all endpoints except openrouter, which broke custom HTTP backends that require the full string. Treat custom the same as openrouter for model passthrough.

Adds a regression test in provider-client.spec.ts.

Made-with: Cursor


Summary by cubic

Preserves full vendor/path model IDs for custom provider endpoints to avoid breaking custom gateways (e.g., "z-ai/step-3.5-flash"). Aligns custom endpoint behavior with OpenRouter by skipping prefix stripping.

  • Bug Fixes
    • Treat custom endpoints like openrouter in model handling to bypass prefix stripping.
    • Add regression test to ensure the full model ID is sent for custom endpoints.

Written for commit 0f4568c. Summary will update on new commits.

Custom gateways configure upstream model names like z-ai/step-3.5-flash.
stripModelPrefix was stripping the first path segment for all endpoints
except openrouter, which broke custom HTTP backends that require the
full string. Treat custom the same as openrouter for model passthrough.

Adds a regression test in provider-client.spec.ts.

Made-with: Cursor
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant