Skip to content

Commit c2bed92

Browse files
small changes to openai agents sdk
1 parent 4de7bce commit c2bed92

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

integrations/agents/openai-agents.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,15 +252,16 @@ print(Runner.run_sync(agent, "Recursion haiku.").final_output)
252252
**Comparing the 3 approaches**
253253

254254
| Strategy | Code Touchpoints | Best For |
255-
|----------|-----------------|----------|
255+
|:----------|:-----------------|:----------|
256256
| **Global Client** via `set_default_openai_client` | One-time setup; agents need only model names | Whole app uses Portkey; simplest migration |
257257
| **ModelProvider in RunConfig** | Add a provider + pass `run_config` | Toggle Portkey per run; A/B tests, staged rollouts |
258258
| **Explicit Model per Agent** | Specify `OpenAIChatCompletionsModel` in agent | Mixed fleet: each agent can talk to a different provider |
259259

260-
<Accordion title="End-to-End Example: Research Agent with Tools">
261-
Here's a more comprehensive agent that can use tools to perform tasks:
260+
## End-to-End Example
262261

263-
```python
262+
**Research Agent with Tools**: Here's a more comprehensive agent that can use tools to perform tasks.
263+
264+
```python [expandable]
264265
from agents import Agent, Runner, Tool, set_default_openai_client
265266
from openai import AsyncOpenAI
266267
from portkey_ai import PORTKEY_GATEWAY_URL, createHeaders
@@ -325,7 +326,8 @@ print(result.final_output)
325326
```
326327

327328
Visit your Portkey dashboard to see the complete execution flow visualized!
328-
</Accordion>
329+
330+
---
329331

330332
## Production Features
331333

0 commit comments

Comments
 (0)