Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions transports/bifrost-http/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ type BifrostHTTPServer struct {
Client *bifrost.Bifrost
Config *lib.Config

KeySelector schemas.KeySelector // embedder key-selection policy; nil keeps core's default
KeyPoolFilter schemas.KeyPoolFilter // embedder key-pool filter; nil keeps core's default

// HTTPClientFactory hands out clients for outbound traffic other than provider
// inference (webhooks, skills, plugin downloads, MCP, catalog sync) that honour
// the global proxy for their purpose and follow proxy changes live.
Expand Down Expand Up @@ -3270,6 +3273,9 @@ func startSkillsOrphanCleanupWorker(ctx context.Context, config *lib.Config, sho
// 3. Initializes the Bifrost client with the configuration
// 4. Sets up HTTP routes for text and chat completions
//
// KeySelector and KeyPoolFilter are passed to core here, so an embedder must
// set them before calling Bootstrap.
//
// The server exposes the following endpoints:
// - POST /v1/text/completions: For text completion requests
// - POST /v1/chat/completions: For chat completion requests
Expand Down Expand Up @@ -3419,6 +3425,8 @@ func (s *BifrostHTTPServer) Bootstrap(ctx context.Context) error {
Logger: logger,
KVStore: s.Config.KVStore,
ModelCatalog: s.Config.ModelCatalog,
KeySelector: s.KeySelector,
KeyPoolFilter: s.KeyPoolFilter,
Comment on lines +3428 to +3429

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Hook wiring lacks tests

Bootstrap now passes KeySelector and KeyPoolFilter to core, but the PR adds no tests for either hook. The repository requires every behavior change to include regression tests. Add coverage showing that both supplied hooks reach core and that nil preserves the defaults. This repository requirement must be satisfied before merging.

File Used: AGENTS.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

})
if err != nil {
return fmt.Errorf("failed to initialize bifrost: %v", err)
Expand Down
1 change: 1 addition & 0 deletions transports/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Features

- **Azure Blob Storage** - Added log payload and skills-file storage with default Azure identity or connection-string authentication, JSON/gzip and Parquet support, and config-file/Helm configuration. Structured environment and vault references can omit `value`.
- **Key Selection Hooks for Embedders** - `BifrostHTTPServer` gains `KeySelector` and `KeyPoolFilter`, passed to core on `Bootstrap`, so a program embedding the HTTP server can supply its own key-selection policy. Unset, core's defaults apply [@jeremym-tanium](https://github.com/jeremym-tanium)

## 🔒 Security

Expand Down