(raw)
| 2792 | } |
| 2793 | |
| 2794 | function mapModel(raw) { |
| 2795 | return { |
| 2796 | id: String(raw.id), |
| 2797 | model: String(raw.model), |
| 2798 | displayName: String(raw.displayName || raw.model), |
| 2799 | description: String(raw.description || ''), |
| 2800 | isDefault: Boolean(raw.isDefault), |
| 2801 | supportedReasoningEfforts: Array.isArray(raw.supportedReasoningEfforts) |
| 2802 | ? raw.supportedReasoningEfforts |
| 2803 | .map((entry) => entry?.reasoningEffort) |
| 2804 | .filter((value) => typeof value === 'string') |
| 2805 | : [], |
| 2806 | defaultReasoningEffort: typeof raw.defaultReasoningEffort === 'string' ? raw.defaultReasoningEffort : null, |
| 2807 | }; |
| 2808 | } |
| 2809 | |
| 2810 | function mapAppServerRateLimits(payload: CodexAppRateLimitsResponse | null | undefined): ProviderUsageReport | null { |
| 2811 | if (!payload || typeof payload !== 'object') { |
nothing calls this directly
no outgoing calls
no test coverage detected