Changeset 0.9.1 (#51)
This commit is contained in:
@@ -193,11 +193,8 @@ func (p *OpenAIProvider) ListModels(ctx context.Context, cfg ProviderConfig) ([]
|
||||
|
||||
out := make([]Model, 0, len(result.Data))
|
||||
for _, m := range result.Data {
|
||||
// Try known table first, then heuristic
|
||||
caps, found := capabilities.LookupKnownModel(m.ID)
|
||||
if !found {
|
||||
caps = capabilities.InferCapabilities(m.ID)
|
||||
}
|
||||
// Heuristic inference from model ID
|
||||
caps := capabilities.InferCapabilities(m.ID)
|
||||
// Use context_length from API if available and we don't have it
|
||||
if m.ContextLength > 0 && caps.MaxContext == 0 {
|
||||
caps.MaxContext = m.ContextLength
|
||||
|
||||
Reference in New Issue
Block a user