(provider: KimiConfig['providers'][string])
| 528 | } |
| 529 | |
| 530 | function providerSourceLabel(provider: KimiConfig['providers'][string]): string { |
| 531 | const source = provider.source; |
| 532 | if (source !== undefined) { |
| 533 | if (source['kind'] === 'apiJson' && typeof source['url'] === 'string') { |
| 534 | return `apiJson(${source['url']})`; |
| 535 | } |
| 536 | } |
| 537 | if (provider.oauth !== undefined) return 'oauth'; |
| 538 | return 'inline'; |
| 539 | } |
| 540 | |
| 541 | function errorMessage(error: unknown): string { |
| 542 | return error instanceof Error ? error.message : String(error); |
no outgoing calls
no test coverage detected