Repository navigation
fix(py): cap anthropic dependency below 1.0 and require flask[async] - #42
Merged
Merged
Conversation
anthropic 1.0.0 removed temperature/top_p/top_k from messages.create() and moved the transport to httpx2. genkit-anthropic forwards those kwargs and catches httpx exceptions, so every fresh install that resolved anthropic>=1 raised TypeError on sampling config. Cap at <1 until the plugin is adapted (BL-22).
genkit_flask_handler returns an async view. Flask needs asgiref (the async extra) to run it; without it the first request fails with 'Install Flask with the async extra'. The monorepo venv masked this because genkit-django pulls asgiref.
The workspace venv carries every package's dependencies, so a package that forgets one (genkit-flask without flask[async]) passes CI and breaks on PyPI. check_isolated_wheels installs each built genkit wheel into its own venv and imports it, with targeted smokes for genkit-flask (async view request) and genkit-anthropic (SDK create() signature).
huangjeff5
force-pushed
the
fix/py-0.13.1-hotfix-pins
branch
from
November 9, 2026 19:07
0475797 to
28c570b
Compare
This repo builds into ./dist. The py/dist fallback and py/bin usage line were carried over from the monorepo port.
cabljac
approved these changes
Nov 10, 2026
Co-authored-by: Jacob Cable <32874567+cabljac@users.noreply.github.com>
huangjeff5
enabled auto-merge (squash)
November 10, 2026 18:37
huangjeff5
disabled auto-merge
November 10, 2026 18:44
huangjeff5
enabled auto-merge (squash)
November 10, 2026 18:45
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fresh installs of
genkit-anthropicandgenkit-flaskfrom PyPI break at runtime. Neither shows up in CI, because the workspace venv carries every package's dependencies.Main Changes
anthropicbelow 1: anthropic 1.0 removedtemperature/top_p/top_kfrommessages.create()and switched its transport fromhttpxtohttpx2. The plugin forwards those kwargs and catcheshttpxexceptions. On 1.x, any sampling config raises TypeError and the timeout/network handlers stop firing. 2.x has the same shape. We pinanthropic>=0.96.0,<1until the plugin moves to the new SDK.flask[async]:genkit_flask_handlerreturns anasync defview, and Flask only runs those whenasgirefis installed. CI never saw the failure because genkit-django pullsasgirefinto the shared venv.bin/check_isolated_wheelsruns in the build job. It installs every builtgenkit*wheel into a fresh venv resolved from PyPI and imports it. It also POSTs to a Flask async flow and checks the installed anthropiccreate()signature. With the old flask pin it fails ongenkit_flask (smoke).Lockfile: specifier changes only, plus the
flask[async]->asgirefedge. anthropic stays at 0.112.0.Breaking changes
None.