feat: attach hosted provider Skills to code-execution / shell tools#695
Conversation
Add an optional `environment` config to `shellTool()` (ShellToolFactoryConfig)
so hosted provider Skills can ride the OpenAI Responses shell tool, e.g.
`shellTool({ environment: { type: 'container_auto', skills: [...] } })`. The
converter now passes `environment` through to the request.
Bumps the openai SDK to ^6.41.0 (required for the typed shell environment.skills
surface) across ai-openai, openai-base, ai-grok, and ai-groq, with the small
SDK-compat adjustments the bump requires (ComputerUsePreviewTool import; dropped
now-redundant casts in image.ts/video.ts).
… beta headers
Add an optional `{ skills }` to `codeExecutionTool(config, options)`. The adapter
lifts those skills into the request's top-level `container.skills` (preserving any
`container.id`) and attaches the required beta headers via `computeAnthropicBetas`:
`code-execution-2025-08-25` (or `code-execution-2025-05-22` for the legacy
`code_execution_20250522` variant) plus `skills-2025-10-02` when skills are present.
Betas are now applied on both the streaming and structuredOutput request paths.
Skills set via `modelOptions.container.skills` are deprecated in favor of the tool
option. Adds unit tests for the lift, the version-aware betas, the skills/lift
agreement across multi-tool configs, and skill_id validation.
…ltipart Add wire-assertion E2E for both providers (Anthropic container.skills + beta headers; OpenAI shell environment.skills) plus the docs page (docs/tools/ provider-skills.md, nav + cross-links) and the tool-calling agent skill section. The openai 6.41 bump makes videos.create send multipart/form-data, which the pinned @copilotkit/aimock (1.27.0) only JSON-parses; add a pnpm patch teaching its video handler to parse multipart (reusing the existing transcription helpers), and give the video-gen fixture the id/status the flow needs. The same fix should be upstreamed to @copilotkit/aimock so the patch can be dropped.
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR adds Provider Skills support for both Anthropic and OpenAI, enabling developers to attach hosted/provider-managed skills to execution tools. Anthropic skills are lifted into ChangesProvider Skills Feature Implementation
🎯 4 (Complex) | ⏱️ ~60 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 Changeset Version Preview5 package(s) bumped directly, 0 bumped as dependents. 🟨 Minor bumps
🟩 Patch bumps
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit dfc7b98
☁️ Nx Cloud last updated this comment at |
|
View your CI Pipeline Execution ↗ for commit e3f5d7f
☁️ Nx Cloud last updated this comment at |
@tanstack/ai
@tanstack/ai-anthropic
@tanstack/ai-client
@tanstack/ai-code-mode
@tanstack/ai-code-mode-skills
@tanstack/ai-devtools-core
@tanstack/ai-elevenlabs
@tanstack/ai-event-client
@tanstack/ai-fal
@tanstack/ai-gemini
@tanstack/ai-grok
@tanstack/ai-groq
@tanstack/ai-isolate-cloudflare
@tanstack/ai-isolate-node
@tanstack/ai-isolate-quickjs
@tanstack/ai-ollama
@tanstack/ai-openai
@tanstack/ai-openrouter
@tanstack/ai-preact
@tanstack/ai-react
@tanstack/ai-react-ui
@tanstack/ai-solid
@tanstack/ai-solid-ui
@tanstack/ai-svelte
@tanstack/ai-utils
@tanstack/ai-vue
@tanstack/ai-vue-ui
@tanstack/openai-base
@tanstack/preact-ai-devtools
@tanstack/react-ai-devtools
@tanstack/solid-ai-devtools
commit: |
…rop stopgap patch @copilotkit/aimock now parses multipart/form-data video-create bodies natively (CopilotKit/aimock#247), so the local pnpm patch is no longer needed. Bump the e2e dependency to ^1.28.1 (the release carrying that fix) and remove the patch file + patchedDependencies entry. Note: CI is expected to be RED until @copilotkit/aimock >=1.28.1 is published — the lockfile still resolves 1.27.0 and the unpatched mock 400s video-create. Once the release is out, `pnpm install` refreshes the lockfile to 1.28.1 and the video-gen E2E goes green.
## Release 1.29.0 Cuts the accumulated `[Unreleased]` changes as **1.29.0** (semver minor — there are `Added` + `Deprecated` entries). Bumps `package.json` `1.28.0 → 1.29.0` and moves the CHANGELOG `[Unreleased]` section under `## [1.29.0] - 2026-06-04`. **Merging to `main` triggers the Release workflow to publish `1.29.0` to npm** (the workflow publishes when `package.json`'s version isn't yet on the registry). ### What ships in 1.29.0 **Added** - `POST /__aimock/reset/fixtures` and `POST /__aimock/reset/journal` - `aimock-pytest`: `reset_fixtures()` / `reset_journal()` - Control API reference docs **Changed** - `engines.node` lowered to `>=20.15.0` **Deprecated** - `POST /__aimock/reset` (alias for `/reset/fixtures`) **Fixed** - **Video** — `POST /v1/videos` now parses `multipart/form-data` bodies (OpenAI SDK ≥6.28 sends video-create as multipart) — #247 - `aimock-pytest` per-fixture option forwarding + startup-timeout/teardown hardening - `DELETE /v1/_requests` clears only journal entries (preserves fixture match-counts) ### Downstream Unblocks **TanStack/ai#695**, which pins `@copilotkit/aimock: ^1.28.1` and drops its temporary local video-multipart patch — once 1.29.0 is on npm, that PR's E2E goes green. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1.29.0 is published with native multipart/form-data video-create parsing, satisfying the ^1.28.1 spec. Refreshes the lockfile off the now-removed local patch; video-gen E2E passes natively against the published mock.
Summary
Adds support for attaching hosted, provider-managed Agent Skills to the server-side execution tool that runs them, for both Anthropic and OpenAI.
codeExecutionTool(config, { skills: [{ type: 'anthropic', skill_id: 'pptx', version: 'latest' }] }). The adapter lifts the skills into the request's top-levelcontainer.skills(preserving anycontainer.id) and auto-attaches the required beta headers —code-execution-2025-08-25(orcode-execution-2025-05-22for the legacycode_execution_20250522variant) plusskills-2025-10-02— on both the streaming andstructuredOutputpaths.shellTool({ environment: { type: 'container_auto', skills: [{ type: 'skill_reference', skill_id: '...', version: '2' }] } }), threaded through the Responses-API shell tool.Skills are configured on the execution-tool factory (not a top-level prop), so they cannot be passed without the tool that runs them, and there's no name collision with the unrelated
@tanstack/ai-code-mode-skills(local TS functions). Scope: hosted/managed skills referenced by id + version (inline bundles / local paths / the upload API are out of scope).Setting skills via Anthropic's
modelOptions.container.skillsis now deprecated in favor ofcodeExecutionTool(config, { skills }).Dependency note
Bumps the
openaiSDK^6.9.1 → ^6.41.0(required for the typed shellenvironment.skillssurface) acrossai-openai,openai-base,ai-grok,ai-groq, with the small SDK-compat adjustments the bump requires.openai 6.41 also switched
videos.createtomultipart/form-data, which the pinned@copilotkit/aimock@1.27.0only JSON-parsed — breaking the existingvideo-genE2E. This PR adds a committedpnpm patchteaching aimock's video handler to parse multipart (reusing its existing transcription helpers) so the suite stays green. Follow-up: upstream the same fix to@copilotkit/aimockand drop the patch.Test Plan
computeAnthropicBetas, skills/lift agreement across multi-tool configs,skill_idvalidationcontainer.skills+ beta headers and OpenAItools[].environment.skillsreach the real serialized requestpnpm test:prgreen across all affected projects (sherif, knip, docs, eslint, lib, types, build)video-genafter the aimock patch)docs/tools/provider-skills.md+ adapter cross-links) and thetool-callingagent skill updatedKnown limitations / follow-ups
outputSchematogether on Anthropic: the structured-output path uses the forced-tool-use workaround (replacestoolswith the forcedstructured_outputtool), so thecode_executiontool isn't present alongside the schema. Pre-existing design, documented here for awareness.pnpm patchonce@copilotkit/aimockships multipart video-create parsing.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Deprecations
modelOptions.container.skillspath as deprecated; use tool-level configuration instead.Dependencies