133
*/
134
export function fromSdkModelInfo(m: ModelInfo, provider: AgentProvider): IAgentModelInfo {
135
>
const supportedEfforts = (m.supportedEffortLevels ?? []).filter(isClaudeEffortLevel);
claudeAgent.ts
136
>
const configSchema = createClaudeThinkingLevelSchema(supportedEfforts);
137
>
return {
138
>
provider,
139
>
// SDK-canonical id (`m.value`, e.g. `claude-sonnet-4-5-20250929`). Native
140
>
// ids are SDK format end to end; `toSdkModelId` is identity at this seam.
141
>
id: m.value,
142
>
name: m.displayName,
143
>
supportsVision: false,
144
>
...(configSchema ? { configSchema } : {}),
145
>
};
146
>
}
147
148
// Single source of truth for narrowing an arbitrary runtime value to