Skip to content

Commit c1e5be5

Browse files
authored
docs: add supported headers reference documentation (#1488)
s## Add comprehensive HTTP headers documentation This PR adds a new documentation page that provides a complete reference of all HTTP headers supported by Bifrost gateway. The documentation includes context keys, types, descriptions, and usage examples for each header. ## Changes - Added new documentation page `docs/providers/supported-headers.mdx` with comprehensive header reference - Updated navigation in `docs/docs.json` to include the new page - Enhanced existing documentation in provider configuration and context keys pages to reference the new headers documentation - Added documentation for the passthrough extra parameters feature (`x-bf-passthrough-extra-params` header) ## Type of change - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (Next.js) - [x] Docs ## How to test The documentation can be tested by running the docs site locally: ```sh cd docs npm install npm run dev ``` Then navigate to the new page at `/providers/supported-headers` to verify the content. ## Breaking changes - [x] No ## Related issues Addresses the need for comprehensive header documentation to help users understand all available request configuration options. ## Checklist - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I updated documentation where needed - [x] I verified builds succeed (Go and UI)
2 parents 85d0beb + d00a391 commit c1e5be5

File tree

5 files changed

+919
-1
lines changed

5 files changed

+919
-1
lines changed

core/schemas/chatcompletions.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ func (cr *BifrostChatRequest) GetRawRequestBody() []byte {
2121
return cr.RawRequestBody
2222
}
2323

24+
func (cr *BifrostChatRequest) GetExtraParams() map[string]interface{} {
25+
if cr.Params == nil {
26+
return make(map[string]interface{}, 0)
27+
}
28+
return cr.Params.ExtraParams
29+
}
30+
2431
// BifrostChatResponse represents the complete result from a chat completion request.
2532
type BifrostChatResponse struct {
2633
ID string `json:"id"`

docs/docs.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@
114114
"providers/provider-routing",
115115
"providers/reasoning",
116116
"providers/performance",
117-
"providers/custom-providers"
117+
"providers/custom-providers",
118+
"providers/request-options"
118119
]
119120
},
120121
{
@@ -492,6 +493,10 @@
492493
]
493494
},
494495
"redirects": [
496+
{
497+
"source": "/providers/supported-headers",
498+
"destination": "/providers/request-options"
499+
},
495500
{
496501
"source": "/features/unified-interface",
497502
"destination": "/providers/supported-providers/overview"

0 commit comments

Comments
 (0)