fix: model id

This commit is contained in:
Laisky.Cai
2024-04-18 03:37:25 +00:00
parent 03184457f9
commit e93e489ea9
5 changed files with 11 additions and 5 deletions

View File

@@ -79,7 +79,7 @@ func SetupContextForSelectedChannel(c *gin.Context, channel *model.Channel, mode
c.Set("channel_id", channel.Id)
c.Set("channel_name", channel.Name)
c.Set("model_mapping", channel.GetModelMapping())
c.Set("original_model", modelName) // for retry
c.Set(common.CtxKeyOriginModel, modelName) // for retry
c.Request.Header.Set("Authorization", fmt.Sprintf("Bearer %s", channel.Key))
c.Set("base_url", channel.GetBaseURL())
// this is for backward compatibility