(raw string)
| 480 | } |
| 481 | |
| 482 | func parseChatModelOverride(raw string) (*uuid.UUID, error) { |
| 483 | trimmed := strings.TrimSpace(raw) |
| 484 | if trimmed == "" { |
| 485 | //nolint:nilnil // Empty site-config value means the override is unset. |
| 486 | return nil, nil |
| 487 | } |
| 488 | modelConfigID, err := uuid.Parse(trimmed) |
| 489 | if err != nil { |
| 490 | return nil, xerrors.Errorf("parse chat model override: %w", err) |
| 491 | } |
| 492 | return &modelConfigID, nil |
| 493 | } |
| 494 | |
| 495 | func formatChatModelOverride(id *uuid.UUID) string { |
| 496 | if id == nil { |
no test coverage detected