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

Commit e18cf7a

Browse files
authored
Remove hardcoded Triton allowlist (#60961)
* First version working * Add PR link * Table driven test for embeddings * Use constants * Minor clean-up * Config for triton URL * Comments * Const * Remove hardcoded allowlist * Remove hardcoded
1 parent ec02bad commit e18cf7a

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

cmd/cody-gateway/internal/httpapi/embeddings/handler.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,6 @@ func NewHandler(
193193
}
194194

195195
func isAllowedModel(allowedModels []string, model string) bool {
196-
// TODO(rafax): Remove the SourcegraphTriton model once sourcegraph.com allow-list rolls out with https://github.com/sourcegraph/sourcegraph/pull/60956
197-
if model == "sourcegraph/triton" {
198-
return true
199-
}
200196
for _, m := range allowedModels {
201197
if strings.EqualFold(m, model) {
202198
return true

cmd/cody-gateway/internal/httpapi/embeddings/models.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ func NewListHandler() http.Handler {
4242
if !act.AccessEnabled || !ok || !rl.IsValid() {
4343
return false
4444
}
45-
// TODO(rafax): Remove the SourcegraphTriton model once sourcegraph.com allow-list rolls out with https://github.com/sourcegraph/sourcegraph/pull/60956
46-
return model == ModelNameSourcegraphTriton || slices.Contains(rl.AllowedModels, string(model))
45+
return slices.Contains(rl.AllowedModels, string(model))
4746
}
4847

4948
models := modelsResponse{

0 commit comments

Comments
 (0)