Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pydantic_ai_slim/pydantic_ai/ui/_web/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ async def health(request: Request) -> Response:

async def post_chat(request: Request) -> Response:
"""Handle chat requests via Vercel AI Adapter."""
adapter = await VercelAIAdapter[AgentDepsT, OutputDataT].from_request(request, agent=agent)
adapter = await VercelAIAdapter[AgentDepsT, OutputDataT].from_request(request, agent=agent, sdk_version=6)
extra_data = ChatRequestExtra.model_validate(adapter.run_input.__pydantic_extra__)

if error := validate_request_options(extra_data, model_ids, allowed_tool_ids):
Expand All @@ -163,6 +163,7 @@ async def post_chat(request: Request) -> Response:
streaming_response = await VercelAIAdapter[AgentDepsT, OutputDataT].dispatch_request(
request,
agent=agent,
sdk_version=6,
model=model_ref,
builtin_tools=request_builtin_tools,
deps=deps,
Expand Down
2 changes: 1 addition & 1 deletion pydantic_ai_slim/pydantic_ai/ui/_web/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'you can use the `web` optional group — `pip install "pydantic-ai-slim[web]"`'
) from _import_error

CHAT_UI_VERSION = '1.0.0'
CHAT_UI_VERSION = '2.0.0'
DEFAULT_HTML_URL = f'https://cdn.jsdelivr.net/npm/@pydantic/ai-chat-ui@{CHAT_UI_VERSION}/dist/index.html'

AgentDepsT = TypeVar('AgentDepsT')
Expand Down
Loading