Normalize an `error.code` to the string slot our RUN_ERROR event reads.
(code: unknown)
| 1901 | |
| 1902 | /** Normalize an `error.code` to the string slot our RUN_ERROR event reads. */ |
| 1903 | function normalizeCode(code: unknown): string | undefined { |
| 1904 | if (typeof code === 'string') return code |
| 1905 | if (typeof code === 'number' && Number.isFinite(code)) return String(code) |
| 1906 | return undefined |
| 1907 | } |
| 1908 | |
| 1909 | export function createOpenRouterResponsesText< |
| 1910 | TModel extends OpenRouterResponsesTextModels, |
no outgoing calls
no test coverage detected