Skip to content

Commit f9ec911

Browse files
committed
Remove unused code
Signed-off-by: David Gageot <david.gageot@docker.com>
1 parent eadb6c2 commit f9ec911

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

pkg/modelsdev/store.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ const (
2121
refreshInterval = 24 * time.Hour
2222
)
2323

24-
// ModelAliases maps alias model IDs to their actual model IDs
25-
// TODO(krissetto): Add aliases here if needed, removed if unused
26-
var ModelAliases = map[string]string{}
27-
2824
// Store manages access to the models.dev data.
2925
// The database is loaded lazily on first access and cached for the
3026
// lifetime of the Store. All methods are safe for concurrent use.
@@ -96,11 +92,6 @@ func (s *Store) GetProvider(ctx context.Context, providerID string) (*Provider,
9692

9793
// GetModel returns a specific model by provider ID and model ID.
9894
func (s *Store) GetModel(ctx context.Context, id string) (*Model, error) {
99-
// Check if the ID is an alias and resolve it
100-
if actualID, isAlias := ModelAliases[id]; isAlias {
101-
id = actualID
102-
}
103-
10495
parts := strings.SplitN(id, "/", 2)
10596
if len(parts) != 2 {
10697
return nil, fmt.Errorf("invalid model ID: %q", id)
@@ -250,15 +241,6 @@ func (s *Store) ResolveModelAlias(ctx context.Context, providerID, modelName str
250241
return modelName
251242
}
252243

253-
// Check if there's a manual alias mapping first
254-
fullID := providerID + "/" + modelName
255-
if resolved, ok := ModelAliases[fullID]; ok {
256-
if _, m, ok := strings.Cut(resolved, "/"); ok {
257-
return m
258-
}
259-
return resolved
260-
}
261-
262244
// If the model already has a date suffix, it's already pinned
263245
if datePattern.MatchString(modelName) {
264246
return modelName

0 commit comments

Comments
 (0)