Answer: Set the `model` option to pin a specific model, using either a model alias or a full model name. You can also set `fallbackModel` (TypeScript) or `fallback_model` (Python) to name a backup model. Status: Confirmed Entry: tool/claude-code/models/set-model-agent-sdk-session Revision: 3 Digest: sha256:cb464662e0c3e223 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:02:38Z Last changed: 2026-11-20T12:16:21Z (accepted value: model alias or a full model name → a model alias or a full model name) Last verified: 2026-11-20T12:16:21Z Next check: 2026-11-21T12:16:21Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of model option | model | [1] | 2026-11-20 accepted value | a model alias or a full model name | [1] | 2026-11-20 fallback option (TypeScript) | fallbackModel | [1] | 2026-11-20 fallback option (Python) | fallback_model | [1] | 2026-11-20 example model value | claude-fable-5 | [1] | 2026-11-20 Sources: [1] Anthropic. "Configure your agent". https://code.claude.com/docs/en/agent-sdk/configuration.md Role: primary. Accessed: 2026-11-20T12:16:21Z Quote: "Set `model` to pin a specific model, or to pick a smaller one for faster, cheaper agents." (Supports: model option) Quote: "The value takes a model alias or a full model name" (Supports: accepted value) Quote: "Set `fallbackModel` (TypeScript) or `fallback_model` (Python) to name a backup model." (Supports: fallback option (TypeScript), fallback option (Python)) Quote: "model: "claude-fable-5"," (Supports: example model value) Published: 2026-11-20T02:52:33Z Snapshot SHA-256: e8eaeff8e41acc725cb781af740f2c42a1e83825a7a3ebd74738d2f7136b13f5 (captured 2026-11-20T12:16:21Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:16:21Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:16:21Z Last attempt: 2026-11-20T12:16:21Z Notes and limitations: Extracted automatically from a single official source (section "Choose a model"). Related: https://latestn.com/tool/claude-code/models/todo-tools-model-availability Which Claude models have the task-tracking tools (TodoWrite, TaskCreate, TaskGet, TaskUpdate, TaskList) available by default in Claude Code? https://latestn.com/tool/claude-code/permissions-and-security/additional-working-directories How do I let Claude Code read and edit files outside the working directory? https://latestn.com/tool/claude-code/permissions-and-security/allow-deny-rules How do I configure allow and deny rules for tools in Claude Code? https://latestn.com/tool/claude-code/models/restrict-available-models How do I restrict which models are available in Claude Code? https://latestn.com/tool/claude-code/models/set-default-model How do I set the default model in Claude Code settings.json? https://latestn.com/tool/claude-code/models/set-model How do I set which model Claude Code uses? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-20T12:16:21Z | changed | accepted value: model alias or a full model name → a model alias or a full model name | [1] 2026-11-17T12:20:16Z | changed | example model value: — → claude-fable-5 | [1] 2026-11-17T12:20:16Z | changed | example model: claude-fable-5 → — | [1] 2026-11-17T12:20:16Z | changed | accepted value: a model alias or a full model name → model alias or a full model name | [1] 2026-11-13T03:02:38Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/models/set-model-agent-sdk-session/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/models/set-model-agent-sdk-session POST: https://latestn.com/dispute/tool/claude-code/models/set-model-agent-sdk-session with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/models/set-model-agent-sdk-session?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I set the model for a Claude Code Agent SDK session? Revision 3, last verified 2026-11-20T12:16:21Z. https://latestn.com/tool/claude-code/models/set-model-agent-sdk-session (accessed 2026-11-21T09:54:03Z). @misc{LatestN_tool_claude_code_models_set_model_agent_sdk_session_r3, title = {How do I set the model for a Claude Code Agent SDK session?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/models/set-model-agent-sdk-session}}, note = {Revision 3; digest sha256:cb464662e0c3e223; last verified 2026-11-20T12:16:21Z; accessed 2026-11-21T09:54:03Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/models/set-model-agent-sdk-session