Skip to main content
Cookbook example demonstrating adaptive thinking with output_config on VertexAI.
The pinned v2.7.4 source imports Claude from the empty agno.models.vertexai package root. Use the released module path before running.
adaptive_thinking.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export environment variables

4

Authenticate with Google Cloud

Sign in with Application Default Credentials:
5

Fix the Claude import

Replace from agno.models.vertexai import Claude with from agno.models.vertexai.claude import Claude in the saved file.
6

Run the example

Save the code above as adaptive_thinking.py, then run:
Full source: cookbook/90_models/vertexai/claude/adaptive_thinking.py