fix(ai-bedrock): use /openai/v1 on mantle for google.gemma - #1270
fix(ai-bedrock): use /openai/v1 on mantle for google.gemma#1270harshlocham wants to merge 3 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (5)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe Bedrock client now selects ChangesBedrock Gemma Mantle path
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized change adjusts the Bedrock Mantle path for Gemma models while preserving explicit base URLs and existing paths for other models; no actionable merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The PR addresses the Gemma routing requirement from issue Full details: Docstring CoverageExplanation Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. (2 skipped: 2 unsupported.)
✨ 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 |
|
View your CI Pipeline Execution ↗ for commit 73aec31
☁️ Nx Cloud last updated this comment at |
@tanstack/ai
@tanstack/ai-acp
@tanstack/ai-angular
@tanstack/ai-anthropic
@tanstack/ai-bedrock
@tanstack/ai-byteplus
@tanstack/ai-claude-code
@tanstack/ai-client
@tanstack/ai-code-mode
@tanstack/ai-code-mode-snippets
@tanstack/ai-codex
@tanstack/ai-cohere
@tanstack/ai-compaction
@tanstack/ai-devtools-core
@tanstack/ai-durable-stream
@tanstack/ai-elevenlabs
@tanstack/ai-event-client
@tanstack/ai-fal
@tanstack/ai-gemini
@tanstack/ai-grok
@tanstack/ai-grok-build
@tanstack/ai-groq
@tanstack/ai-isolate-cloudflare
@tanstack/ai-isolate-daytona
@tanstack/ai-isolate-node
@tanstack/ai-isolate-quickjs
@tanstack/ai-isolate-quickjs-bun
@tanstack/ai-llmgateway
@tanstack/ai-lovable
@tanstack/ai-mcp
@tanstack/ai-memory
@tanstack/ai-mistral
@tanstack/ai-octane
@tanstack/ai-ollama
@tanstack/ai-openai
@tanstack/ai-opencode
@tanstack/ai-openrouter
@tanstack/ai-perplexity
@tanstack/ai-persistence
@tanstack/ai-preact
@tanstack/ai-react
@tanstack/ai-react-ui
@tanstack/ai-sandbox
@tanstack/ai-sandbox-cloudflare
@tanstack/ai-sandbox-daytona
@tanstack/ai-sandbox-docker
@tanstack/ai-sandbox-local-process
@tanstack/ai-sandbox-sprites
@tanstack/ai-sandbox-upstash-box
@tanstack/ai-sandbox-vercel
@tanstack/ai-skills
@tanstack/ai-solid
@tanstack/ai-solid-ui
@tanstack/ai-svelte
@tanstack/ai-utils
@tanstack/ai-vercel-gateway
@tanstack/ai-vertex
@tanstack/ai-vue
@tanstack/ai-vue-ui
@tanstack/openai-base
@tanstack/preact-ai-devtools
@tanstack/react-ai-devtools
@tanstack/solid-ai-devtools
@tanstack/svelte-ai-devtools
commit: |
7566bec to
73aec31
Compare
|
Thanks for the PR, @harshlocham! 🙌 @tombeckenham will take a look. Automated pre-review checks
Automated triage — a human review follows. |
- Introduced a new changeset to specify that `google.gemma-*` models now use the `/openai/v1` path on the Bedrock Mantle endpoint, ensuring correct routing for chat and response requests. - Updated documentation to reflect the new endpoint behavior for Gemma models. - Modified the `buildBaseURL` function to dynamically set the base URL based on the model type. - Enhanced tests to verify the correct base URL is used for both Gemma and other models on the mantle endpoint.
- Updated the Bedrock Mantle endpoint to specify that only `google.gemma-4-*` models use the `/openai/v1` path, while `google.gemma-3-*` models continue to use `/v1`. - Adjusted documentation to clarify the endpoint behavior for different Gemma model versions. - Enhanced tests to ensure correct base URL handling for both Gemma 3 and Gemma 4 models.
73aec31 to
6117a15
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
On the Bedrock Mantle endpoint, Gemma 4 models are served at /openai/v1. The adapter always used /v1, so the request failed with a misleading 401. This change sends google.gemma-4-* to /openai/v1. An explicit baseURL still wins.
Fixes #925
🎯 Changes
withBedrockDefaultsnow takes an optional model id. On mantle, ids that start withgoogle.gemma-use/openai/v1. Other models keep/v1. The chat and responses adapters pass the model id. The runtime endpoint path does not change.Out of scope: Claude on mantle (
/anthropic/v1/messagesis a different API). Gemma is still absent from the generated catalog, sobedrockText('google.gemma-4-31b', { api: 'chat' })still fails the chat-model check until that entry exists.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.docs/for this change, or this change is not user-facing.pnpm changeset), or this PR does not change a published package.🚀 Release Impact
Summary by CodeRabbit
Bug Fixes
google.gemma-4-*models by using the/openai/v1path./v1routing for Gemma 3 and other models.Documentation
Tests