Skip to content

feat(provider/openai): support native skills and hosted shell#12581

Open
felixarntz wants to merge 12 commits intomainfrom
fa/12487-add-openai-skills-and-hosted-shell-support
Open

feat(provider/openai): support native skills and hosted shell#12581
felixarntz wants to merge 12 commits intomainfrom
fa/12487-add-openai-skills-and-hosted-shell-support

Conversation

@felixarntz
Copy link
Contributor

@felixarntz felixarntz commented Feb 13, 2026

Background

OpenAI's Responses API supports skills natively attached to the shell tool environment. Skills allow extending the shell tool with custom instructions and capabilities, similar to Anthropic's computer use features.

Additionally, the shell tool now supports running in a hosted container on OpenAI's infrastructure. This is recent and an enhancement over the initial implementation which only supported "local" execution (implemented in #10810 for AI SDK).

See:

Summary

Adds native OpenAI skills support to the shell tool environment for the Responses API via providerOptions.
Supports both local shell execution and hosted container shell execution.

Key changes:

  • Extended openai.tools.shell() with environment configuration supporting three modes:
    • containerAuto: Automatic container provisioning with optional skills
    • containerReference: Reference to existing container
    • local: Local execution with filesystem-based skills
  • Skills can be provided as inline base64-encoded zip files (skillReference or inline types for container environments) or filesystem paths (for local environments)
  • Added shell_call_output handling in the language model stream parser (relevant for container hosted shell)
  • Fixture-based tests with real API responses
  • Examples demonstrating both container-based and local skill usage
  • Expands docs accordingly

The implementation is fully backward compatible; existing shell tool usage without skills continues to work unchanged (important note: environment.type must remain optional and default to local); verified by running existing tests and examples originally introduced.

Manual Verification

Ran example scripts with both container-based and local skills configurations:

# Container-based skills (inline skill from zip file)
pnpm tsx examples/ai-functions/src/generate-text/openai-responses-shell-container-skills.ts
pnpm tsx examples/ai-functions/src/stream-text/openai-responses-shell-container-skills.ts

# Local skills (filesystem-based)
pnpm tsx examples/ai-functions/src/generate-text/openai-responses-shell-local-skills.ts
pnpm tsx examples/ai-functions/src/stream-text/openai-responses-shell-local-skills.ts

Also run the other examples/ai-functions/src/generate-text/openai-responses-shell-* and examples/ai-functions/src/stream-text/openai-responses-shell-* examples to verify back compat.

Checklist

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

Future Work

  • Abstract OpenAI Skills and Anthropic computer use into unified specification (AI SDK v7)

Related Issues

Fixes #12487

Builds on top of #10810

Copy link
Contributor

@aayush-kapoor aayush-kapoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please add/modify the ui example that exists for shell tool under examples/next-openai to make sure it works for multiturn conversations?

also maybe a separate UI example for skills? basically one modifies the exisiting local shell execution and one that tests container execution

@felixarntz
Copy link
Contributor Author

@aayush-kapoor great point. tested the original ui examples and added some more for container based shell tool, with and without skills.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support OpenAI responses API skills

2 participants