supportedModelSetForAuth snapshots the registry models currently registered for an auth.
(authID string)
| 550 | |
| 551 | // supportedModelSetForAuth snapshots the registry models currently registered for an auth. |
| 552 | func supportedModelSetForAuth(authID string) map[string]struct{} { |
| 553 | authID = strings.TrimSpace(authID) |
| 554 | if authID == "" { |
| 555 | return nil |
| 556 | } |
| 557 | models := registry.GetGlobalRegistry().GetModelsForClient(authID) |
| 558 | if len(models) == 0 { |
| 559 | return nil |
| 560 | } |
| 561 | set := make(map[string]struct{}, len(models)) |
| 562 | for _, model := range models { |
| 563 | if model == nil { |
| 564 | continue |
| 565 | } |
| 566 | modelKey := canonicalModelKey(model.ID) |
| 567 | if modelKey == "" { |
| 568 | continue |
| 569 | } |
| 570 | set[modelKey] = struct{}{} |
| 571 | } |
| 572 | return set |
| 573 | } |
| 574 | |
| 575 | // upsertAuthLocked updates every existing model shard that can reference the auth metadata. |
| 576 | func (p *providerScheduler) upsertAuthLocked(meta *scheduledAuthMeta, now time.Time) { |
no test coverage detected