Skip to content

Fix temporal example by making client init lazy?#151

Draft
msullivan wants to merge 1 commit into
mainfrom
temporal-http
Draft

Fix temporal example by making client init lazy?#151
msullivan wants to merge 1 commit into
mainfrom
temporal-http

Conversation

@msullivan
Copy link
Copy Markdown
Contributor

The temporal example got broken by get_model eagerly creating a
provider, which creates an httpx client. httpx imports anyio, which
uses threading.local, which apparently isn't allowed in a temporal
workflow.

Here is a fix based on lazily creating the model, which seems like a
sort of plausible thing to do?

Thoughts?

The temporal example got broken by `get_model` eagerly creating a
provider, which creates an httpx client. httpx imports anyio, which
uses threading.local, which apparently isn't allowed in a temporal
workflow.

Here is a fix based on lazily creating the model, which seems like a
sort of plausible thing to do?

Thoughts?
@msullivan msullivan requested review from anbuzin and elprans May 23, 2026 00:56
@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-python Ready Ready Preview, Comment May 23, 2026 12:57am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant