mirror of
https://github.com/patriceckhart/zot.git
synced 2026-06-26 21:36:31 +02:00
refactor: simplify OpenRouter context window selection
- collapse if/else-if into a single condition - same behavior (no change in functionality)
This commit is contained in:
parent
1425e68636
commit
bd648be324
1 changed files with 1 additions and 3 deletions
|
|
@ -284,9 +284,7 @@ func DiscoverOpenRouter(ctx context.Context, baseURL string) ([]Model, error) {
|
|||
display = d.ID
|
||||
}
|
||||
ctxWin := d.ContextLength
|
||||
if ctxWin == 0 {
|
||||
ctxWin = d.TopProvider.ContextLength
|
||||
} else if d.TopProvider.ContextLength > 0 && d.TopProvider.ContextLength < ctxWin {
|
||||
if d.TopProvider.ContextLength > 0 && (ctxWin == 0 || d.TopProvider.ContextLength < ctxWin) {
|
||||
ctxWin = d.TopProvider.ContextLength
|
||||
}
|
||||
maxOut := 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue