fix(openclaw): use proxy API for google models behind cllama#129
Merged
fix(openclaw): use proxy API for google models behind cllama#129
Conversation
Owner
Author
|
Addressed the two must-fix review points:
Re-verified with:
|
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.
Summary
google/*models behindcllamathrough the proxy API surface instead of Google-native OpenClaw API modeWhy
When OpenClaw rewrites
google/*providers tohttp://cllama:8080/v1, it must speak the proxy's OpenAI-compatible surface.google-generative-aicauses OpenClaw to hit the wrong path and return404 page not found.What changed
cllamaModelAPIForProvider()helper inside the cllama rewrite branchanthropic-messagesopenai-completionsgoogle/* + cllama=>openai-completionsgoogle/*=> no cllama provider rewrite, native Google API behavior preservedValidation
go test -run 'TestGenerateConfig(CllamaGoogleUsesOpenAICompletions|DirectGoogleKeepsNativeAPI|CllamaRewritesProviderBaseURL|CllamaRewritesAllModelProviders)' -count=1 ./internal/driver/openclawgo test -count=1 ./internal/driver/openclawgo test -count=1 ./internal/driver/...Scope note
I audited the other cllama-aware drivers while fixing this. This specific provider-API mismatch is confined to OpenClaw; the others do not compile the same
apifield in their cllama path.Closes #127