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
1 change: 1 addition & 0 deletions core/schemas/bifrost.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ const (
RoutingEngineGovernance = "governance"
RoutingEngineRoutingRule = "routing-rule"
RoutingEngineLoadbalancing = "loadbalancing"
RoutingEngineModelCatalog = "model-catalog"
)

// KeyAttemptRecord captures the outcome of a single request attempt within executeRequestWithRetries.
Expand Down
22 changes: 11 additions & 11 deletions transports/bifrost-http/handlers/asyncinference.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (h *AsyncHandler) RegisterRoutes(r *router.Router, middlewares ...schemas.B

// asyncTextCompletion handles POST /v1/async/completions
func (h *AsyncHandler) asyncTextCompletion(ctx *fasthttp.RequestCtx) {
req, bifrostTextReq, err := prepareTextCompletionRequest(ctx)
req, bifrostTextReq, err := prepareTextCompletionRequest(ctx, h.config)
if err != nil {
SendError(ctx, fasthttp.StatusBadRequest, err.Error())
return
Expand Down Expand Up @@ -137,7 +137,7 @@ func (h *AsyncHandler) asyncTextCompletion(ctx *fasthttp.RequestCtx) {

// asyncChatCompletion handles POST /v1/async/chat/completions
func (h *AsyncHandler) asyncChatCompletion(ctx *fasthttp.RequestCtx) {
req, bifrostChatReq, err := prepareChatCompletionRequest(ctx)
req, bifrostChatReq, err := prepareChatCompletionRequest(ctx, h.config)
if err != nil {
SendError(ctx, fasthttp.StatusBadRequest, err.Error())
return
Expand Down Expand Up @@ -174,7 +174,7 @@ func (h *AsyncHandler) asyncChatCompletion(ctx *fasthttp.RequestCtx) {

// asyncResponses handles POST /v1/async/responses
func (h *AsyncHandler) asyncResponses(ctx *fasthttp.RequestCtx) {
req, bifrostResponsesReq, err := prepareResponsesRequest(ctx)
req, bifrostResponsesReq, err := prepareResponsesRequest(ctx, h.config)
if err != nil {
SendError(ctx, fasthttp.StatusBadRequest, err.Error())
return
Expand Down Expand Up @@ -212,7 +212,7 @@ func (h *AsyncHandler) asyncResponses(ctx *fasthttp.RequestCtx) {

// asyncEmbeddings handles POST /v1/async/embeddings
func (h *AsyncHandler) asyncEmbeddings(ctx *fasthttp.RequestCtx) {
_, bifrostEmbeddingReq, err := prepareEmbeddingRequest(ctx)
_, bifrostEmbeddingReq, err := prepareEmbeddingRequest(ctx, h.config)
if err != nil {
SendError(ctx, fasthttp.StatusBadRequest, err.Error())
return
Expand Down Expand Up @@ -244,7 +244,7 @@ func (h *AsyncHandler) asyncEmbeddings(ctx *fasthttp.RequestCtx) {

// asyncSpeech handles POST /v1/async/audio/speech
func (h *AsyncHandler) asyncSpeech(ctx *fasthttp.RequestCtx) {
req, bifrostSpeechReq, err := prepareSpeechRequest(ctx)
req, bifrostSpeechReq, err := prepareSpeechRequest(ctx, h.config)
if err != nil {
SendError(ctx, fasthttp.StatusBadRequest, err.Error())
return
Expand Down Expand Up @@ -281,7 +281,7 @@ func (h *AsyncHandler) asyncSpeech(ctx *fasthttp.RequestCtx) {

// asyncTranscription handles POST /v1/async/audio/transcriptions
func (h *AsyncHandler) asyncTranscription(ctx *fasthttp.RequestCtx) {
bifrostTranscriptionReq, stream, err := prepareTranscriptionRequest(ctx)
bifrostTranscriptionReq, stream, err := prepareTranscriptionRequest(ctx, h.config)
if err != nil {
SendError(ctx, fasthttp.StatusBadRequest, err.Error())
return
Expand Down Expand Up @@ -318,7 +318,7 @@ func (h *AsyncHandler) asyncTranscription(ctx *fasthttp.RequestCtx) {

// asyncImageGeneration handles POST /v1/async/images/generations
func (h *AsyncHandler) asyncImageGeneration(ctx *fasthttp.RequestCtx) {
req, bifrostReq, err := prepareImageGenerationRequest(ctx)
req, bifrostReq, err := prepareImageGenerationRequest(ctx, h.config)
if err != nil {
SendError(ctx, fasthttp.StatusBadRequest, err.Error())
return
Expand Down Expand Up @@ -355,7 +355,7 @@ func (h *AsyncHandler) asyncImageGeneration(ctx *fasthttp.RequestCtx) {

// asyncImageEdit handles POST /v1/async/images/edits
func (h *AsyncHandler) asyncImageEdit(ctx *fasthttp.RequestCtx) {
req, bifrostReq, err := prepareImageEditRequest(ctx)
req, bifrostReq, err := prepareImageEditRequest(ctx, h.config)
if err != nil {
SendError(ctx, fasthttp.StatusBadRequest, err.Error())
return
Expand Down Expand Up @@ -392,7 +392,7 @@ func (h *AsyncHandler) asyncImageEdit(ctx *fasthttp.RequestCtx) {

// asyncImageVariation handles POST /v1/async/images/variations
func (h *AsyncHandler) asyncImageVariation(ctx *fasthttp.RequestCtx) {
bifrostReq, err := prepareImageVariationRequest(ctx)
bifrostReq, err := prepareImageVariationRequest(ctx, h.config)
if err != nil {
SendError(ctx, fasthttp.StatusBadRequest, err.Error())
return
Expand Down Expand Up @@ -424,7 +424,7 @@ func (h *AsyncHandler) asyncImageVariation(ctx *fasthttp.RequestCtx) {

// asyncRerank handles POST /v1/async/rerank
func (h *AsyncHandler) asyncRerank(ctx *fasthttp.RequestCtx) {
_, bifrostReq, err := prepareRerankRequest(ctx)
_, bifrostReq, err := prepareRerankRequest(ctx, h.config)
if err != nil {
SendError(ctx, fasthttp.StatusBadRequest, err.Error())
return
Expand Down Expand Up @@ -456,7 +456,7 @@ func (h *AsyncHandler) asyncRerank(ctx *fasthttp.RequestCtx) {

// asyncOCR handles POST /v1/async/ocr
func (h *AsyncHandler) asyncOCR(ctx *fasthttp.RequestCtx) {
_, bifrostReq, err := prepareOCRRequest(ctx)
_, bifrostReq, err := prepareOCRRequest(ctx, h.config)
if err != nil {
SendError(ctx, fasthttp.StatusBadRequest, err.Error())
return
Expand Down
Loading
Loading