MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / mapModel

Function mapModel

packages/codex-native-api/src/codex_app_client.ts:2794–2808  ·  view source on GitHub ↗
(raw)

Source from the content-addressed store, hash-verified

2792}
2793
2794function 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
2810function mapAppServerRateLimits(payload: CodexAppRateLimitsResponse | null | undefined): ProviderUsageReport | null {
2811 if (!payload || typeof payload !== 'object') {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected