Infer × Pydantic AI · live check 2.27.1
Point Pydantic AI at Infer’s Responses endpoint.
Use OpenAIResponsesModel with a custom OpenAIProvider. The checked path stayed on /v1/responses; each completed request produced an Infer charge record.
Pinned setup
Install the versions that were checked.
The base URL ends at /v1. The OpenAI client appends /responses. Keep the Infer key in the environment.
python -m pip install "pydantic-ai-slim[openai]==2.27.1" "openai==2.53.0"Read current status for infer/gpt-5.6-luna:low-cost, verify the account email, fund the wallet, and create a capped API key.
max_retries=0, max_tokens=96, and openai_store=False are the bounded proof settings. They are not claims about the right retry or output policy for every application.
import os
from openai import AsyncOpenAI
from pydantic_ai import Agent
from pydantic_ai.models.openai import (
OpenAIResponsesModel,
OpenAIResponsesModelSettings,
)
from pydantic_ai.providers.openai import OpenAIProvider
client = AsyncOpenAI(
base_url="https://infer.flow7.org/v1",
api_key=os.environ["INFER_API_KEY"],
max_retries=0,
timeout=60.0,
)
model = OpenAIResponsesModel(
"infer/gpt-5.6-luna:low-cost",
provider=OpenAIProvider(openai_client=client),
settings=OpenAIResponsesModelSettings(
max_tokens=96,
openai_store=False,
timeout=60.0,
),
)
agent = Agent(model, retries=0)
result = agent.run_sync("Your bounded task")
print(result.output)
This code names the exact selector used for the dated record. Other published selectors require their own status check and workload test.
Dated production record
Five completions. Five receipts. $0.000071 total.
Checked August 11, 2026 with retries disabled and two temporary keys capped at $0.05. Both keys were revoked after reconciliation. The record is a compatibility check, not workload or uptime certification.
rcpt_f66a08e6239575f7fda6388c.run_stream consumed Responses SSE and exact text for $0.000010: rcpt_1f6538aa655af104edea3114.rcpt_17a4bf1ea4d61080a0abec12.function_call and function_call_output, then returned exact text for $0.000017: rcpt_d483fc0e0cae5cdc9a8805c9.NativeOutput sent text.format.type = "json_schema" and returned the typed object for $0.000021: rcpt_9401911fae8dbf4c0be6b344.upstream_unavailable before completion. It produced no receipt and a $0.000000 customer charge; one controlled repeat passed./v1/responses. No /v1/chat/completions request was observed.Claim boundary
What this proves—and what it does not.
- 01
Not a first-class Pydantic provider.
Infer works through Pydantic AI’s
OpenAIResponsesModeland a customOpenAIProvider. This is not a Pydantic endorsement or a named provider built into Pydantic AI. - 02
SSE-compatible, not real-time upstream streaming.
Pydantic received
response.created, text-delta, item-done, andresponse.completedevents. Infer currently emits that stream after the upstream response completes. This record does not establish first-token latency. - 03
No GPT-specific feature claim.
The
infer/selector does not activate Pydantic AI’s OpenAI model-name profile for GPT-specific reasoning or related features. Reasoning modes were not tested. - 04
No server-state or hosted-tool claim.
Conversations,
previous_response_id, background mode, compaction, native hosted tools, cancellation, images, and every published Infer selector remain untested here. - 05
No supplier attestation.
The receipts prove Infer-routed requests completed and record customer charges. They do not disclose or attest the upstream supplier identity.
Start with one capped request.
Create an account, verify the email, add service credit, and check the selected route before running the pinned setup.