proxy,ui: split provider API surfaces#764
Conversation
WalkthroughThis PR introduces provider-specific API surfaces for llama-swap by registering canonical ChangesAPI Surface Split & Provider-Specific Routes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 32: The bullet "Shared `/v1/...` paths remain available for existing
clients." is currently nested under the Anthropic endpoints section and should
be moved out to a top-level position so it clearly applies to both OpenAI and
Anthropic surfaces; update README.md by removing the indentation/child-bullet
under the "Anthropic endpoints" block and place that exact bullet at the same
level as the main OpenAI/Anthropic headings (e.g., directly under the
compatibility or overview list) so its scope is unambiguous.
In `@ui-svelte/src/components/playground/ChatInterface.svelte`:
- Around line 41-49: The current $effect maps a few legacy keys via
obsoleteEndpoints but leaves any other stale/invalid $endpointStore values
untouched; update the effect in ChatInterface.svelte to validate $endpointStore
against the obsoleteEndpoints map and known canonical values and, if not
recognized, call endpointStore.set(...) to reset to a canonical default (e.g.
"openai/v1/chat/completions"); use the existing symbols ($effect,
obsoleteEndpoints, $endpointStore, endpointStore.set) to locate and implement
this fallback reset so unrecognized persisted endpoint values never pass
through.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: dd424aec-ba11-4ce1-86ba-aa8759aff8e1
📒 Files selected for processing (9)
README.mddocs/2026-05-16-split-api-surfaces/PRD.mddocs/2026-05-16-split-api-surfaces/SPEC.mdproxy/helpers_test.goproxy/proxymanager.goproxy/proxymanager_test.goui-svelte/src/components/ModelsPanel.svelteui-svelte/src/components/playground/ChatInterface.svelteui-svelte/src/lib/chatApi.ts
|
@mostlygeek please take a look |
|
Hi, Could you share the problem this PR is looking to solve? |
|
@mostlygeek As a user, I want to
For example, most apps use OpenAI API and work with them, while Anthropic ones require only theirs. When I see "here is OpenAI API" and "here is Anthropic API", it makes me easy to get in. |
Add canonical provider-prefixed API paths for OpenAI and Anthropic clients while keeping the existing shared
/v1routes available./openai/v1routes for OpenAI-compatible endpoints/anthropic/v1routes for Anthropic-compatible endpoints