chore: updated docs for extra params passthrough - #3897
Conversation
📝 WalkthroughWalkthroughDocumentation for Passthrough Extra Parameters is enhanced to clarify collection behavior based on request entrypoint: standard inference routes accept top-level JSON fields, while OpenAI integration routes require fields under ChangesPassthrough Extra Parameters Documentation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
8c3e42e to
b95e8e7
Compare
c65201d to
0b942a1
Compare
0b942a1 to
c6bd504
Compare
7b61914 to
0048573
Compare
Confidence Score: 5/5Documentation-only change with no runtime code touched; all three modifications are accurate against the current Go SDK API. The Go SDK fix is verified against core/schemas/context.go — NewBifrostContext returns *BifrostContext, SetValue is the correct method, and BifrostContextKeyPassthroughExtraParams is not in the reserved-key list so the write is not silently dropped. The new cURL example correctly uses the extra_params wrapper for the /openai route. The router's ParseModelString handles the 'openai/gpt-4o-mini' format used in both examples. No files require special attention. Important Files Changed
Reviews (5): Last reviewed commit: "chore: updated docs for extra params pas..." | Re-trigger Greptile |
0048573 to
f413b61
Compare
879a747 to
d6ce973
Compare
f413b61 to
c9acc93
Compare
c9acc93 to
0fb06e5
Compare
d6ce973 to
82403ee
Compare
0fb06e5 to
b2ab05b
Compare
82403ee to
a6b4820
Compare
b2ab05b to
8137423
Compare
a6b4820 to
48158ed
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@docs/providers/request-options.mdx`:
- Line 549: Update the cURL example endpoint which currently uses
'http://localhost:8080/openai/chat/completions' to the correct route
'/openai/v1/chat/completions' so the example calls
'http://localhost:8080/openai/v1/chat/completions'; locate the cURL snippet in
the docs where the broken URL appears and replace the path portion to match the
integration route '/openai/v1/chat/completions'.
🪄 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: ASSERTIVE
Plan: Pro
Run ID: d1ddf18a-bd70-476d-9c9b-b52a3fe66029
📒 Files selected for processing (1)
docs/providers/request-options.mdx
Merge activity
|
## Summary Clarifies how `passthrough_extra_params` works across different entrypoints, and fixes an incorrect Go SDK usage example that was using the wrong context API. ## Changes - Added an explanation distinguishing how extra parameters are collected on standard inference routes (`/v1/chat/completions`, `/v1/responses`, `/v1/embeddings`, `/v1/images/generations`) versus OpenAI integration routes (`/openai`), where unknown top-level fields are not collected and `extra_params` must be used explicitly. - Added a new cURL example tab for the OpenAI integration route showing correct `extra_params` usage. - Fixed the Go SDK example to use `schemas.NewBifrostContext` and `ctx.SetValue` instead of the incorrect `context.WithValue` pattern. - Removed trailing newline inconsistency at end of file. ## Type of change - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs ## How to test Review the updated `docs/providers/request-options.mdx` page and verify: - The new explanation paragraph accurately reflects routing behavior. - The OpenAI integration cURL example renders correctly in the tabbed view. - The Go SDK example compiles correctly against the current SDK API. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated request options documentation to clarify how extra parameters are handled differently for standard inference routes versus OpenAI integration routes. * Enhanced Gateway and Go SDK examples to better illustrate the correct structure for passing extra parameters based on request type. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary Clarifies how `passthrough_extra_params` works across different entrypoints, and fixes an incorrect Go SDK usage example that was using the wrong context API. ## Changes - Added an explanation distinguishing how extra parameters are collected on standard inference routes (`/v1/chat/completions`, `/v1/responses`, `/v1/embeddings`, `/v1/images/generations`) versus OpenAI integration routes (`/openai`), where unknown top-level fields are not collected and `extra_params` must be used explicitly. - Added a new cURL example tab for the OpenAI integration route showing correct `extra_params` usage. - Fixed the Go SDK example to use `schemas.NewBifrostContext` and `ctx.SetValue` instead of the incorrect `context.WithValue` pattern. - Removed trailing newline inconsistency at end of file. ## Type of change - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs ## How to test Review the updated `docs/providers/request-options.mdx` page and verify: - The new explanation paragraph accurately reflects routing behavior. - The OpenAI integration cURL example renders correctly in the tabbed view. - The Go SDK example compiles correctly against the current SDK API. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated request options documentation to clarify how extra parameters are handled differently for standard inference routes versus OpenAI integration routes. * Enhanced Gateway and Go SDK examples to better illustrate the correct structure for passing extra parameters based on request type. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary Clarifies how `passthrough_extra_params` works across different entrypoints, and fixes an incorrect Go SDK usage example that was using the wrong context API. ## Changes - Added an explanation distinguishing how extra parameters are collected on standard inference routes (`/v1/chat/completions`, `/v1/responses`, `/v1/embeddings`, `/v1/images/generations`) versus OpenAI integration routes (`/openai`), where unknown top-level fields are not collected and `extra_params` must be used explicitly. - Added a new cURL example tab for the OpenAI integration route showing correct `extra_params` usage. - Fixed the Go SDK example to use `schemas.NewBifrostContext` and `ctx.SetValue` instead of the incorrect `context.WithValue` pattern. - Removed trailing newline inconsistency at end of file. ## Type of change - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs ## How to test Review the updated `docs/providers/request-options.mdx` page and verify: - The new explanation paragraph accurately reflects routing behavior. - The OpenAI integration cURL example renders correctly in the tabbed view. - The Go SDK example compiles correctly against the current SDK API. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated request options documentation to clarify how extra parameters are handled differently for standard inference routes versus OpenAI integration routes. * Enhanced Gateway and Go SDK examples to better illustrate the correct structure for passing extra parameters based on request type. <!-- end of auto-generated comment: release notes by coderabbit.ai -->

Summary
Clarifies how
passthrough_extra_paramsworks across different entrypoints, and fixes an incorrect Go SDK usage example that was using the wrong context API.Changes
/v1/chat/completions,/v1/responses,/v1/embeddings,/v1/images/generations) versus OpenAI integration routes (/openai), where unknown top-level fields are not collected andextra_paramsmust be used explicitly.extra_paramsusage.schemas.NewBifrostContextandctx.SetValueinstead of the incorrectcontext.WithValuepattern.Type of change
Affected areas
How to test
Review the updated
docs/providers/request-options.mdxpage and verify:Breaking changes
Related issues
Security considerations
None.
Checklist
docs/contributing/README.mdand followed the guidelinesSummary by CodeRabbit