Repository navigation
pass Anthropic requests natively to SGLang and LMDeploy - #242
Merged
Merged
Conversation
… path filtering stops dropping them
…s, drop vLLM count_tokens, note minimum versions
…g LMDeploy tool requests
…switch back to translation
…d add the Docker single-file mount
…f the generic OpenAI profile
…and Responses paths
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #240. Merge that first.
Summary
SGLang (0.5.9+) and LMDeploy (0.13.0+) serve the Anthropic Messages API themselves, but their profiles had no
anthropic_support, so/olla/anthropic/v1/messagesalways translated through/v1/chat/completions.sglang.yamlandlmdeploy.yamlnow carryanthropic_support, so requests pass through withX-Olla-Mode: passthrough. LMDeploy 0.13.0 to 0.17.x reject Anthropictools, so its profile declaresno_tool_useand requests carryingtools(or a baretool_choice) are still translated. Thehandler_translation.gochange treats a baretool_choiceas tool use.Behaviour change
Native passthrough is now on by default for SGLang 0.5.9+ and LMDeploy 0.13.0+. Older versions answer 404 on
/v1/messages, andmin_versionis informational, so Olla does not enforce it. To switch back to translation, copy the profile toconfig/profiles/zz-sglang.yamlorzz-lmdeploy.yamland setapi.anthropic_support.enabled: falsein the copy, or settranslators.anthropic.passthrough_enabled: falseto translate for every backend. Steps, including the Docker single-file mount, are indocs/content/integrations/backend/sglang.mdanddocs/content/integrations/backend/lmdeploy.mdunder "Switching SGLang or LMDeploy back to translation".Type of change
How was this tested?
New tests:
TestShippedProfiles_NativeAnthropicDefaultsTestShippedProfiles_NativeAnthropicLocalOverrideDisablesTestTranslationHandler_NativeAnthropic_SGLangAndLMDeployPassThroughTestTranslationHandler_NativeAnthropic_ToolRequestsTestTranslationHandler_NativeAnthropic_LMDeployToolChoiceWithoutToolsTested together with the other October follow-up branches on a local integration branch at
0c25e0a:make readyandmake test-racepass at0c25e0a/olla-validate --quick: 42 pass, 0 fail (warnings and skips are nightly-only items)tei-routingvalidation area: Section A 12/12, Section B B1 to B6 pass/test-sticky-sessions: no new failures (the 7 provider-route 404s are the known shared-mock-URL limitation)/claude-code-e2eagainst real Ollama: Tier A 16/0 on both the passthrough and translation legs, same as mainChecklist
make readypasses at72479f4api-translation.md,profile-system.md,anthropic.md,readme.md, v0.0.30 release note