Skip to content

Commit 8d6c577

Browse files
committed
apply suggested changes
1 parent eca4742 commit 8d6c577

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

docs/ai_gateway/gateway.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Pydantic AI Gateway
22

3-
**Pydantic AI Gateway** (PAIG) is a unified interface for accessing multiple AI providers with a single key. Features include built-in OpenTelemetry observability, real-time cost monitoring, failover management , and native integration with the Pydantic stack.
3+
**Pydantic AI Gateway** (PAIG) is a unified interface for accessing multiple AI providers with a single key. Features include built-in OpenTelemetry observability, real-time cost monitoring, failover management, and native integration with the Pydantic stack.
44

55
!!! note "Free while in Beta"
66
The Pydantic AI Gateway is currently in Beta. You can bring your own key (BYOK) or buy inference through the Gateway (we will eat the card fee for now).
@@ -11,24 +11,22 @@ For questions and feedback, contact us on [Slack](https://logfire.pydantic.dev/d
1111

1212
## Documentation Integration
1313

14-
To help you get started with [Pydantic AI Gateway](https://gateway.pydantic.dev), most code examples throughout the Pydantic AI docs include a "Pydantic AI Gateway" tab alongside the standard Pydantic AI call string named here "Direct to Provider API" tab. This allows you to see how to adapt examples for Gateway usage by simply switching tabs.
15-
16-
The main difference is that when using Gateway, model strings use the `gateway/` prefix.
14+
To help you get started with [Pydantic AI Gateway](https://gateway.pydantic.dev), some code examples on the Pydantic AI documentation include a "Via Pydantic AI Gateway" tab, alongside a "Direct to Provider API" tab with the standard Pydantic AI model string. The main difference between them is that when using Gateway, model strings use the `gateway/` prefix.
1715

1816
## Key features
1917
- **API key management**: access multiple LLM providers with a single Gateway key.
2018
- **Cost Limits**: set spending limits at project, user, and API key levels with daily, weekly, and monthly caps.
21-
- **BYOK and managed providers:** Bring your own API keys (BYOK) from LLM providers, or pay for API usage directly through the platform (_coming soon_).
19+
- **BYOK and managed providers:** Bring your own API keys (BYOK) from LLM providers, or pay for inference directly through the platform.
2220
- **Multi-provider support:** Access models from OpenAI, Anthropic, Google Vertex, Groq, and AWS Bedrock. _More providers coming soon_.
2321
- **Backend observability:** Log every request through [Pydantic Logfire](https://pydantic.dev/logfire) or any OpenTelemetry backend (_coming soon_).
2422
- **Zero translation**: Unlike traditional AI gateways that translate everything to one common schema, PAIG allows requests to flow through directly in each provider's native format. This gives you immediate access to the new model features as soon as they are released.
2523
- **Open source with self-hosting**: PAIG's core is [open source](https://github.com/pydantic/pydantic-ai-gateway/) (under [AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.en.html)), allowing self-hosting with file-based configuration, instead of using the managed service.
2624
- **Enterprise ready**: Includes SSO (with OIDC support), granular permissions, and flexible deployment options. Deploy to your Cloudflare account, or run on-premises with our [consulting support](https://pydantic.dev/contact).
2725

28-
```python {title="hello_world.py" test="skip"}
26+
```python {title="hello_world.py"}
2927
from pydantic_ai import Agent
3028

31-
agent = Agent('gateway/chat:gpt-4.1')
29+
agent = Agent('gateway/chat:gpt-5')
3230

3331
result = agent.run_sync('Where does "hello world" come from?')
3432
print(result.output)

mkdocs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ nav:
2424
- message-history.md
2525
- direct.md
2626
- Models & Providers:
27-
- Overview: models/gateway.md
27+
- Overview: models/overview.md
2828
- models/openai.md
2929
- models/anthropic.md
3030
- models/google.md
@@ -63,7 +63,7 @@ nav:
6363
- Quick Start: evals/quick-start.md
6464
- Core Concepts: evals/core-concepts.md
6565
- Evaluators:
66-
- Overview: evals/evaluators/gateway.md
66+
- Overview: evals/evaluators/overview.md
6767
- Built-in Evaluators: evals/evaluators/built-in.md
6868
- LLM Judge: evals/evaluators/llm-judge.md
6969
- Custom Evaluators: evals/evaluators/custom.md
@@ -90,12 +90,12 @@ nav:
9090
- Integrations:
9191
- Debugging & Monitoring with Pydantic Logfire: logfire.md
9292
- Durable Execution:
93-
- Overview: durable_execution/gateway.md
93+
- Overview: durable_execution/overview.md
9494
- Temporal: durable_execution/temporal.md
9595
- DBOS: durable_execution/dbos.md
9696
- Prefect: durable_execution/prefect.md
9797
- UI Event Streams:
98-
- Overview: ui/gateway.md
98+
- Overview: ui/overview.md
9999
- AG-UI: ui/ag-ui.md
100100
- Vercel AI: ui/vercel-ai.md
101101
- Agent2Agent (A2A): a2a.md

tests/test_examples.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ def print(self, *args: Any, **kwargs: Any) -> None:
179179
env.set('MOONSHOTAI_API_KEY', 'testing')
180180
env.set('DEEPSEEK_API_KEY', 'testing')
181181
env.set('OVHCLOUD_API_KEY', 'testing')
182+
env.set('PYDANTIC_AI_GATEWAY_API_KEY', 'testing')
182183

183184
prefix_settings = example.prefix_settings()
184185
opt_test = prefix_settings.get('test', '')

0 commit comments

Comments
 (0)