Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 7a5e7da

Browse files
authored
Remove code for rewriting st models (#60199)
1 parent 6bdf41e commit 7a5e7da

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

cmd/cody-gateway/internal/httpapi/completions/fireworks.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -118,22 +118,6 @@ func (f *FireworksHandlerMethods) transformBody(body *fireworksRequest, _ string
118118
body.N = 1
119119
}
120120

121-
// This code rewrites an older model identifier that we've used when testing a single-tenant
122-
// deployment and that is no longer live. Since the clients used to hard code these, some
123-
// outdated clients might still be sending these requests and we want to make sure they are
124-
// compatible with the new virtual model strings.
125-
if f.config.DisableSingleTenant {
126-
oldModel := body.Model
127-
if body.Model == "accounts/sourcegraph/models/starcoder-16b" {
128-
body.Model = "starcoder-16b"
129-
} else if body.Model == "accounts/sourcegraph/models/starcoder-7b" {
130-
body.Model = "starcoder-7b"
131-
}
132-
if oldModel != body.Model {
133-
f.baseLogger.Debug("rewriting model", log.String("old-model", oldModel), log.String("new-model", body.Model))
134-
}
135-
}
136-
137121
// Enterprise virtual model string
138122
if body.Model == "starcoder" {
139123
body.Model = pickModelBasedOnTrafficSplit(f.config.StarcoderEnterpriseSingleTenantPercent, fireworks.Starcoder16bSingleTenant, fireworks.Starcoder16b)

cmd/cody-gateway/shared/config/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ type FireworksConfig struct {
7777
AllowedModels []string
7878
AccessToken string
7979
LogSelfServeCodeCompletionRequests bool
80-
DisableSingleTenant bool
8180
StarcoderCommunitySingleTenantPercent int
8281
StarcoderEnterpriseSingleTenantPercent int
8382
}
@@ -163,7 +162,6 @@ func (c *Config) Load() {
163162
}, ","),
164163
"Fireworks models that can be used."))
165164
c.Fireworks.LogSelfServeCodeCompletionRequests = c.GetBool("CODY_GATEWAY_FIREWORKS_LOG_SELF_SERVE_COMPLETION_REQUESTS", "false", "Whether we should log self-serve code completion requests.")
166-
c.Fireworks.DisableSingleTenant = c.GetBool("CODY_GATEWAY_FIREWORKS_DISABLE_SINGLE_TENANT", "false", "Whether we should disable single tenant models for Fireworks.")
167165
if c.Fireworks.AccessToken != "" && len(c.Fireworks.AllowedModels) == 0 {
168166
c.AddError(errors.New("must provide allowed models for Fireworks"))
169167
}

0 commit comments

Comments
 (0)