-
Notifications
You must be signed in to change notification settings - Fork 186
docs: update provider configuration documentation and UI references #1263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🧪 Test Suite AvailableThis PR can be tested by a repository admin. |
📝 WalkthroughSummary by CodeRabbitRelease Notes
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughThe PR updates provider configuration documentation for both gateway and Go SDK, refactoring UI navigation paths to use "Model Providers" terminology and reorganizing sections for custom headers, raw request/response handling, and base URL configuration. The HTTP server's auth middleware initialization is guarded to depend on ConfigStore availability and enterprise context. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom Pre-merge Checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
docs/quickstart/gateway/provider-configuration.mdx (1)
511-524: Typo: Key name doesn't match provider.In the Anthropic configuration example, the key name is incorrectly set to
"openai-key-1"instead of"anthropic-key-1".Suggested fix
# Anthropic with conservative settings curl --location 'http://localhost:8080/api/providers' \ --header 'Content-Type: application/json' \ --data '{ "provider": "anthropic", "keys": [ { - "name": "openai-key-1", + "name": "anthropic-key-1", "value": "env.ANTHROPIC_API_KEY", "models": [], "weight": 1.0 } ],docs/quickstart/go-sdk/provider-configuration.mdx (1)
42-48: Removectx *context.Contextparameter from lines 333 and 373.Lines 333 and 373 incorrectly include a
ctx *context.Contextparameter in the function signature. The actual interface definition incore/schemas/account.gospecifiesGetConfigForProvider(providerKey ModelProvider) (*ProviderConfig, error)without a context parameter. Update both examples to match the correct signature:func (a *MyAccount) GetConfigForProvider(provider schemas.ModelProvider) (*schemas.ProviderConfig, error).
🤖 Fix all issues with AI agents
In @docs/quickstart/go-sdk/provider-configuration.mdx:
- Around line 148-151: Add a blank line between the closing Note tag and the
"### Managing Retries" heading so the MDX renders correctly; specifically,
insert one empty line after the </Note> line in
docs/quickstart/go-sdk/provider-configuration.mdx to separate the note block
from the section heading.
🧹 Nitpick comments (1)
transports/bifrost-http/server/server.go (1)
1190-1200: Consider usinglogger.Warninstead oflogger.Errorfor expected behavior.When running intentionally without a config store (e.g.,
--no-config-store), usinglogger.Errormay be misleading since this is expected behavior rather than an error condition. Consider downgrading tologger.Warnorlogger.Infoto better reflect the operational intent.Suggested change
if s.Config.ConfigStore == nil { - logger.Error("auth middleware requires config store, skipping auth middleware initialization") + logger.Warn("auth middleware requires config store, skipping auth middleware initialization") } else {
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (6)
docs/media/provider-configs.pngis excluded by!**/*.pngdocs/media/ui-base-url.pngis excluded by!**/*.pngdocs/media/ui-extra-headers.pngis excluded by!**/*.pngdocs/media/ui-provider-configs.pngis excluded by!**/*.pngdocs/media/ui-raw-request.pngis excluded by!**/*.pngdocs/media/ui-raw-response.pngis excluded by!**/*.png
📒 Files selected for processing (4)
README.mddocs/quickstart/gateway/provider-configuration.mdxdocs/quickstart/go-sdk/provider-configuration.mdxtransports/bifrost-http/server/server.go
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
always check the stack if there is one for the current PR. do not give localized reviews for the PR, always see all changes in the light of the whole stack of PRs (if there is a stack, if there is no stack you can continue to make localized suggestions/reviews)
Files:
README.mdtransports/bifrost-http/server/server.godocs/quickstart/gateway/provider-configuration.mdxdocs/quickstart/go-sdk/provider-configuration.mdx
🧠 Learnings (5)
📚 Learning: 2025-12-09T17:07:42.007Z
Learnt from: qwerty-dvorak
Repo: maximhq/bifrost PR: 1006
File: core/schemas/account.go:9-18
Timestamp: 2025-12-09T17:07:42.007Z
Learning: In core/schemas/account.go, the HuggingFaceKeyConfig field within the Key struct is currently unused and reserved for future Hugging Face inference endpoint deployments. Do not flag this field as missing from OpenAPI documentation or require its presence in the API spec until the feature is actively implemented and used. When the feature is added, update the OpenAPI docs accordingly; otherwise, treat this field as non-breaking and not part of the current API surface.
Applied to files:
transports/bifrost-http/server/server.go
📚 Learning: 2025-12-29T11:54:55.836Z
Learnt from: akshaydeo
Repo: maximhq/bifrost PR: 1153
File: framework/configstore/rdb.go:2221-2246
Timestamp: 2025-12-29T11:54:55.836Z
Learning: In Go reviews, do not flag range-over-int patterns like for i := range n as compile-time errors, assuming Go 1.22+ semantics. Only flag actual range-capable values (slices, arrays, maps, channels, strings) and other compile-time issues. This applies to all Go files across the repository.
Applied to files:
transports/bifrost-http/server/server.go
📚 Learning: 2025-12-12T08:25:02.629Z
Learnt from: Pratham-Mishra04
Repo: maximhq/bifrost PR: 1000
File: transports/bifrost-http/integrations/router.go:709-712
Timestamp: 2025-12-12T08:25:02.629Z
Learning: In transports/bifrost-http/**/*.go, update streaming response handling to align with OpenAI Responses API: use typed SSE events such as response.created, response.output_text.delta, response.done, etc., and do not rely on the legacy data: [DONE] termination marker. Note that data: [DONE] is only used by the older Chat Completions and Text Completions streaming APIs. Ensure parsers, writers, and tests distinguish SSE events from the [DONE] sentinel and handle each event type accordingly for correct stream termination and progress updates.
Applied to files:
transports/bifrost-http/server/server.go
📚 Learning: 2025-12-29T09:14:16.633Z
Learnt from: akshaydeo
Repo: maximhq/bifrost PR: 888
File: transports/bifrost-http/handlers/middlewares.go:246-256
Timestamp: 2025-12-29T09:14:16.633Z
Learning: In the bifrost HTTP transport, fasthttp.RequestCtx is the primary context carrier and should be passed directly to functions that expect a context.Context. Do not convert to context.Context unless explicitly required. Ensure tracer implementations and related components are designed to accept fasthttp.RequestCtx directly, and document this architectural decision for maintainers.
Applied to files:
transports/bifrost-http/server/server.go
📚 Learning: 2025-12-30T05:37:48.365Z
Learnt from: Pratham-Mishra04
Repo: maximhq/bifrost PR: 1180
File: docs/features/mcp/connecting-to-servers.mdx:452-458
Timestamp: 2025-12-30T05:37:48.365Z
Learning: When reviewing documentation PRs in a Graphite-managed stack, first check related or previous PRs in the stack for feature implementations before flagging documentation as incorrect or unsupported. Documentation MDX files often reference features implemented in earlier stack PRs; verify that the documented behavior exists in earlier changes and that the docs accurately reflect the implemented state before requesting edits.
Applied to files:
docs/quickstart/gateway/provider-configuration.mdxdocs/quickstart/go-sdk/provider-configuration.mdx
🧬 Code graph analysis (1)
transports/bifrost-http/server/server.go (2)
framework/configstore/store.go (1)
ConfigStore(17-158)transports/bifrost-http/handlers/middlewares.go (2)
AuthMiddleware(160-163)InitAuthMiddleware(165-179)
🔇 Additional comments (5)
README.md (1)
258-258: Correct documentation link for development setup.The updated link properly directs contributors to the specific development environment setup section. This change aligns well with the Contributing section's flow and provides clear guidance for build requirements. The URL and anchor have been verified to exist and are accessible.
transports/bifrost-http/server/server.go (1)
1207-1209: LGTM!The nil check on
s.AuthMiddlewarecorrectly guards against dereferencing when running without a config store. This ensures safe operation in both enterprise and non-enterprise contexts when the auth middleware couldn't be initialized.docs/quickstart/go-sdk/provider-configuration.mdx (1)
368-394: LGTM!The new "Send Back Raw Request" section is well-documented and provides clear guidance on debugging request transformations. The tip about combining raw request and response for end-to-end debugging is helpful.
docs/quickstart/gateway/provider-configuration.mdx (2)
570-692: LGTM!The expanded Custom Headers section provides clear documentation for both static (provider-level) and dynamic (per-request) header configurations. The
x-bf-eh-*prefix convention is well explained, and the security denylist documentation helps users understand what headers are restricted.
877-955: LGTM!The new "Send Back Raw Request" section is well-structured and consistent with the existing "Send Back Raw Response" section. The tip about combining both features for debugging is valuable for users troubleshooting request transformations.
Merge activity
|

Summary
Updated documentation for provider configuration with improved UI screenshots and clearer instructions. Fixed auth middleware initialization to handle missing config store gracefully.
Changes
Type of change
Affected areas
How to test
Verify the documentation updates match the current UI:
Test the auth middleware fix:
Screenshots/Recordings
Updated screenshots are included in the PR for the provider configuration UI.
Breaking changes
Related issues
Fixes initialization error when running without a config store.
Security considerations
Improved documentation around header security and the header denylist implementation.
Checklist
docs/contributing/README.mdand followed the guidelines