Basic generation
Usectx.llm.generate() for text completion:
Model Resolution
You can specify models in three ways:- Fully qualified per-call (
provider:model) - use directly - Bare per-call + decorator provider - resolve
- No per-call model + decorator default - use default
- Nothing configured - error
Structured Output
Usectx.llm.generate_object() for JSON Schema-constrained output:
Response Fields
TheLlmResponse object contains:
Error Handling
LLM errors raiseLlmError:
Advanced Options
ctx.llm reference
Full API reference for LLM generation.
How agents work
Why the SDK uses host capabilities instead of direct imports.

