fix: strip route prefix when passing request to aibridged handler (#25671)

We weren't stripping the API base (`/api/v2/aibridge`), leading to 404s
when using the in-memory transport.

Signed-off-by: Danny Kopping <danny@coder.com>
This commit is contained in:
Danny Kopping
2026-05-26 08:04:26 +00:00
committed by GitHub
parent 4f1043a50a
commit c801dcbbc8
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -42,9 +42,9 @@ func (api *API) RegisterInMemoryAIBridgedHTTPHandler(srv http.Handler) {
panic("aibridged cannot be nil")
}
api.aibridgedHandler = srv
api.aibridgedHandler = http.StripPrefix("/api/v2/aibridge", srv)
factory := aibridged.NewTransportFactory(srv)
factory := aibridged.NewTransportFactory(api.aibridgedHandler)
var asInterface agplaibridge.TransportFactory = factory
api.AIBridgeTransportFactory.Store(&asInterface)
}