Skip to content
Merged
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
5 changes: 5 additions & 0 deletions plugins/otel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,11 @@ func (p *OtelPlugin) HTTPTransportStreamChunkHook(ctx *schemas.BifrostContext, r
return chunk, nil
}

// PreRequestHook implements schemas.LLMPlugin (no-op — required for plugin indexing).
func (p *OtelPlugin) PreRequestHook(_ *schemas.BifrostContext, _ *schemas.BifrostRequest) error {
return nil
}

// PreLLMHook is a no-op - tracing is handled via the Inject method.
// The OTEL plugin receives completed traces from TracingMiddleware.
func (p *OtelPlugin) PreLLMHook(_ *schemas.BifrostContext, req *schemas.BifrostRequest) (*schemas.BifrostRequest, *schemas.LLMPluginShortCircuit, error) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/otel/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.20
1.2.21
4 changes: 3 additions & 1 deletion transports/bifrost-http/integrations/cohere_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ func TestCohereRerankRouteRequestConverter(t *testing.T) {
require.NotNil(t, bifrostReq)
require.NotNil(t, bifrostReq.RerankRequest)

assert.Equal(t, schemas.Cohere, bifrostReq.RerankRequest.Provider)
// Provider resolution is deferred to the modelcatalogresolver plugin layer,
// so the converter leaves it empty for an unprefixed model string.
assert.Equal(t, schemas.ModelProvider(""), bifrostReq.RerankRequest.Provider)
Comment on lines +67 to +69

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.

P1 Keep Cohere fallback This expectation locks in an empty provider for the Cohere-specific rerank route. Core only fills that in if the model catalog resolver is registered and finds rerank-v3.5; otherwise validateRequestAfterPreRequestHooks returns could not auto resolve a provider... before the request reaches Cohere. A /cohere/v2/rerank request with a normal unprefixed Cohere model can therefore fail in deployments without a populated model catalog, whereas the converter previously pinned schemas.Cohere and routed correctly.

assert.Equal(t, "rerank-v3.5", bifrostReq.RerankRequest.Model)
assert.Equal(t, "what is bifrost?", bifrostReq.RerankRequest.Query)
require.Len(t, bifrostReq.RerankRequest.Documents, 2)
Expand Down
Loading