Skip to content

Commit 11e8b2b

Browse files
committed
Fix styling issues
1 parent 92b6015 commit 11e8b2b

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

docs/thinking.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,13 @@ Although Bedrock Converse doesn't provide a unified API to enable thinking, you
7171
=== "Claude"
7272

7373
```python {title="bedrock_claude_thinking_part.py"}
74+
from pydantic_ai import Agent
75+
from pydantic_ai.models.bedrock import BedrockConverseModel, BedrockModelSettings
7476

75-
model = BedrockConverseModel("us.anthropic.claude-sonnet-4-5-20250929-v1:0")
77+
model = BedrockConverseModel('us.anthropic.claude-sonnet-4-5-20250929-v1:0')
7678
model_settings = BedrockModelSettings(
7779
bedrock_additional_model_requests_fields={
78-
"thinking": {"type": "enabled", "budget_tokens": 1024}
80+
'thinking': {'type': 'enabled', 'budget_tokens': 1024}
7981
}
8082
)
8183
agent = Agent(model=model, model_settings=model_settings)
@@ -85,10 +87,12 @@ Although Bedrock Converse doesn't provide a unified API to enable thinking, you
8587

8688

8789
```python {title="bedrock_openai_thinking_part.py"}
90+
from pydantic_ai import Agent
91+
from pydantic_ai.models.bedrock import BedrockConverseModel, BedrockModelSettings
8892

89-
model = BedrockConverseModel("openai.gpt-oss-120b-1:0")
93+
model = BedrockConverseModel('openai.gpt-oss-120b-1:0')
9094
model_settings = BedrockModelSettings(
91-
bedrock_additional_model_requests_fields={"reasoning_effort": "low"}
95+
bedrock_additional_model_requests_fields={'reasoning_effort': 'low'}
9296
)
9397
agent = Agent(model=model, model_settings=model_settings)
9498

@@ -97,10 +101,12 @@ Although Bedrock Converse doesn't provide a unified API to enable thinking, you
97101

98102

99103
```python {title="bedrock_qwen_thinking_part.py"}
104+
from pydantic_ai import Agent
105+
from pydantic_ai.models.bedrock import BedrockConverseModel, BedrockModelSettings
100106

101-
model = BedrockConverseModel("qwen.qwen3-32b-v1:0")
107+
model = BedrockConverseModel('qwen.qwen3-32b-v1:0')
102108
model_settings = BedrockModelSettings(
103-
bedrock_additional_model_requests_fields={"reasoning_config": "high"}
109+
bedrock_additional_model_requests_fields={'reasoning_config': 'high'}
104110
)
105111
agent = Agent(model=model, model_settings=model_settings)
106112

@@ -110,8 +116,10 @@ Although Bedrock Converse doesn't provide a unified API to enable thinking, you
110116
Reasoning is [always enabled](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-reasoning.html) for Deepseek model
111117

112118
```python {title="bedrock_deepseek_thinking_part.py"}
119+
from pydantic_ai import Agent
120+
from pydantic_ai.models.bedrock import BedrockConverseModel
113121

114-
model = BedrockConverseModel("us.deepseek.r1-v1:0")
122+
model = BedrockConverseModel('us.deepseek.r1-v1:0')
115123
agent = Agent(model=model)
116124

117125
```

0 commit comments

Comments
 (0)