Skip to content

Fix dynamic protocol routing for discovered models - #2

Merged
yourcasualdev merged 1 commit into
mainfrom
fix/dynamic-model-protocol-routing
Jul 28, 2026
Merged

Fix dynamic protocol routing for discovered models#2
yourcasualdev merged 1 commit into
mainfrom
fix/dynamic-model-protocol-routing

Conversation

@yourcasualdev

Copy link
Copy Markdown
Owner

Summary

  • enrich CLIProxyAPI model discovery with dynamic provider/model protocol metadata from models.dev
  • route Anthropic-compatible models through @ai-sdk/anthropic and /v1/messages without hardcoded model IDs
  • keep the configured default protocol when metadata is unavailable or specifies another SDK
  • preserve discovered routing metadata when merging user model customization

Validation

  • bun run check — 14 tests, typecheck, and build pass
  • local OpenCode smoke test: grok-4.5 returned OK through /v1/chat/completions
  • local OpenCode routing test: minimax-m2.5 reached /v1/messages (upstream Go keys returned 401 and were suspended separately)

Closes #1

Resolve provider and model SDK metadata dynamically so mixed CLIProxyAPI catalogs use their compatible endpoints.\n\nCloses #1
@yourcasualdev

Copy link
Copy Markdown
Owner Author

Local OpenCode review

Reviewed git diff main...HEAD with cliproxyapi/gpt-5.6-sol in a bounded read-only reviewer.

Standards

None.

Spec

None.

Verdict: APPROVE

The reviewer checked CONTRIBUTING.md, issue #1, the implementation and tests, and the live models.dev provider/model metadata shape. No files were changed by the review.

@yourcasualdev
yourcasualdev merged commit 3647757 into main Jul 28, 2026
1 check passed
@yourcasualdev
yourcasualdev deleted the fix/dynamic-model-protocol-routing branch July 28, 2026 19:45
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.

Route dynamically discovered models through their compatible API protocol

1 participant