docs(python): remove legacy v0 SDK references from package READMEs#3283
docs(python): remove legacy v0 SDK references from package READMEs#3283zen-agent wants to merge 5 commits into
Conversation
Rewrites the Python package READMEs that ship to PyPI so new users land on the current SDK pattern instead of the legacy v0 (`composio-core`, `ComposioToolSet`, `Action.X`/`App.X` enums) one. - python/README.md: drop the `pip install composio-core` alternative, add a note marking it as legacy, refresh the provider install list, rewrite the LangChain example to use `LangchainProvider` + `composio.tools.get`, and fix the `OpenAIProvider` import path in the configuration snippet. - python/providers/openai/README.md: rewrite to `OpenAIProvider` + `composio.tools.get` + `composio.provider.handle_tool_calls`. - python/providers/anthropic/README.md: fix wrong package name (`composio-claude` -> `composio-anthropic`, `composio_claude` -> `composio_anthropic`) and rewrite to `AnthropicProvider`. - python/providers/google/README.md: rewrite to `GoogleProvider` + `handle_response`. - python/providers/gemini/README.md: rewrite to `GeminiProvider` with string tool slugs. - python/providers/langgraph/README.md: rewrite to `LanggraphProvider` with string tool slugs and `bind_tools(tools)`. - python/providers/openai_agents/README.md: rewrite to `OpenAIAgentsProvider` with string tool slugs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: palash <palash@composio.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex flagged that the introduced setup commands `composio add github` and `composio toolkits` are not valid CLI subcommands. The real top-level command for linking a connected account is `composio link <toolkit>`, and toolkit discovery only exists under developer mode (`composio dev toolkits …`). Replace the broken pair with the working `composio link` command and a parenthetical pointing to the dashboard, so users on the default (non-dev) CLI mode can follow the quickstarts end-to-end. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: palash <palash@composio.dev>
- google README: composio.tools.get() already returns a list of FunctionDeclaration; wrapping it again in `tools=[tool]` produced a nested list. Pass `tools=tools` directly so GenerativeModel receives the function declarations at the right depth. - openai_agents README: revert "Python 3.10+" back to "Python 3.9+" to match `python/providers/openai_agents/pyproject.toml` and `setup.py`, which still declare `>=3.9`. Documented floor was over-restrictive. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: palash <palash@composio.dev>
- All provider READMEs: drop the `composio link github` setup step. The `composio` CLI is shipped via the TypeScript package only, so on a Python-only install it's unavailable and users would hit `composio: command not found`. Point readers at the Composio dashboard for connecting accounts instead. - google README: wrap the FunctionDeclaration list returned by `composio.tools.get()` in `vertexai.generative_models.Tool` before passing to `GenerativeModel(tools=...)`. Vertex AI validates each entry as a `Tool`, so the previous snippet would raise `TypeError: Unexpected tool type` at model construction. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: palash <palash@composio.dev>
- python/README.md Configuration block: drop the `from composio_openai import OpenAIProvider` line so this generic SDK-config example works on a base `pip install composio` install (composio_openai ships in the separate `composio-openai` package). OpenAIProvider is the default so the constructor still works without it; left a comment pointing to the package for users who want to import it explicitly. - python/README.md provider list: split the merged "Google GenAI / Gemini integration" entry into two separate entries because `composio-google` is the Vertex AI provider and `composio-gemini` is the google-genai provider — installing the wrong one for the example you copy-paste produces ModuleNotFoundError. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: palash <palash@composio.dev>
PR status updateCodex review: 4 iterations, all findings addressed.
CI: 3/3 checks green at SHA Build checks: Testing: docs-only PR; no unit tests apply. Cross-checked every code example in the modified READMEs against the matching demo file in PR comments: no human reviews/comments to address (only Vercel deployment bot). |
Description
The Python package READMEs that ship to PyPI were still showing the legacy v0 SDK (
composio-core,ComposioToolSet,Action.X/App.Xenums,toolset.get_tools(actions=[...])). New users landing on thecomposioPyPI page or any provider PyPI page were copy-pasting v0 code into v1/v3 projects.This PR rewrites those READMEs so the entry-point examples match the current SDK pattern (
Composio(provider=…)+composio.tools.get(user_id=…, toolkits=[…])+composio.provider.handle_tool_calls(…)).Files updated:
python/README.mdpip install composio-corealternative and add a one-line note marking it as the legacy SDK.composioalongside the provider.LangchainProvider+composio.tools.get+create_agent, instead of the oldComposioToolSetpattern.from composio.core.provider import OpenAIProvider→from composio_openai import OpenAIProviderin the configuration snippet (the old import path doesn't exist).python/providers/openai/README.md— rewrite toOpenAIProvider(mentionOpenAIResponsesProviderfor Responses API).python/providers/anthropic/README.md— fix wrong package name (composio-claude→composio-anthropic,composio_claude→composio_anthropic) and rewrite toAnthropicProvider.python/providers/google/README.md— rewrite toGoogleProvider+handle_response. Now correctly points users atcomposio-geminifor the standalone google-genai SDK.python/providers/gemini/README.md— rewrite toGeminiProviderwith string tool slugs (no moreAction.GITHUB_…enum).python/providers/langgraph/README.md— rewrite toLanggraphProviderwith string tool slugs;model.bind_tools(tools)instead ofbind_functions(functions).python/providers/openai_agents/README.md— rewrite toOpenAIAgentsProviderwith string tool slugs.Out of scope (intentionally left alone):
docs/content/docs/quickstart.mdx— thecomposio_corereferences there sit inside<PromptBanner>"DO NOT use" blocks acting as LLM guardrails. They steer users away from v0, not toward it.docs/content/docs/migration-guide/new-sdk.mdx— the v0 snippets there are intentional "Python (previous)" / "TypeScript (previous)" tabs in a migration guide.docs/content/changelog/*.mdx— historical changelog entries.How did I test this PR
grep -nE "composio-core|composio_core|ComposioToolSet|App\.[A-Z_]+|Action\.[A-Z_]+|toolset\.get_tools|composio-cli" python/README.md python/providers/{openai,anthropic,google,gemini,langgraph,openai_agents}/README.md— only match left is the new "legacy SDK" note inpython/README.md.python/providers/<name>/<name>_demo.pyso the import paths, class names, and method signatures all match what's actually exported today.[project] name = …in the matchingpython/providers/<name>/pyproject.toml.