fix: convert to aws claude model id

This commit is contained in:
Laisky.Cai
2024-04-18 03:57:10 +00:00
parent 1d507be770
commit ed716c8515
5 changed files with 6 additions and 11 deletions

View File

@@ -64,7 +64,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