feat: tool_code_execution() — provider-executed code execution
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- python
- 領域
- ai, backend-api-design
調査の方向性
docs/plans のドラフトと、issue に記載されている既存の Web 検索/取得実装から始めます。provider annotation と content-type の先例を追跡し、コンテナの永続化とサポート対象外プラットフォームを含め、Anthropic、OpenAI Responses、Google に必要な作業を定義します。完了とは、設計が確定し、3 つの provider すべてに一貫した first-class tool path があることを意味します。
索引モデルが issue の本文から書いたものです。
説明
Code execution is the last provider-executed tool that is GA across all three first-class providers (Anthropic, OpenAI Responses API, Google Gemini) — the same footprint as tool_web_search(). A first-class tool_code_execution() would let the model run Python server-side for data analysis, math, and file processing with zero local sandbox setup, which is squarely in the wheelhouse of chatlas's data-science audience.
chat.register_tool(tool_code_execution())
chat.chat("Compute the eigenvalues of this matrix and plot them: ...")
Provider mapping
| Provider | Tool spec | Notes |
|---|---|---|
| Anthropic | {"type": "code_execution_20250825", ...} (newer dated variants exist) |
Server sandbox (Python 3.11, no internet). Container reusable across requests via container param. Free when combined with recent web search/fetch variants; otherwise ~1,550 free container-hours/org/month, then $0.05/hr. Docs |
| OpenAI (Responses) | {"type": "code_interpreter", "container": {"type": "auto"}} |
Or an explicit container ID from /v1/containers. Billed per memory tier per 20-min session ($0.03–$1.92). Docs |
types.Tool(code_execution=types.ToolCodeExecution()) |
No extra fee (standard token billing). Python only, ~30s per execution, no custom packages. Returns executable_code / code_execution_result parts. Docs |
Design considerations
- New content types (
ContentToolRequestCodeExecution/ContentToolResponseCodeExecution) following the web search/fetch precedent, registered inPROVIDER_ANNOTATION_TYPESso each provider replays only its own blocks. - Container/session persistence across turns (Anthropic
container, OpenAI container IDs) — likely: scan turn history for the most recent container ID and resend it. - Gemini models before Gemini 3 cannot mix built-in tools with custom function declarations in the same request.
- Availability gaps: not supported on Amazon Bedrock; not supported on Vertex AI for Anthropic models (see the guard issue for how unsupported platforms should fail).
Design work for this is already underway locally (docs/plans draft + worktree).
- 主要言語
- Python
- スター
- 179
- フォーク
- 32
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 10
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
posit-dev/chatlas のほかの issue
-
A streaming text delta that repeats everything streamed so far is missing from the recorded turn対応中かも @cpsievert が 81 日前に担当しました。 オープンai-triage:done Priority: Medium
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
ai-triage:needs-review documentation
難易度 2/5 1〜2日 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 1〜2日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
ai-triage:done Priority: Low
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
posit-dev/chatlas の issue をすべて見る
似ている issue
-
bot-triaged module: decompositions module: edge cases module: int overflow module: primTorch oncall: pt2 triage review
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
country:US rating:6 request-theme type:TV SHOW
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
LizardByte/ThemerrDB#10501 · コメント 1 件 ·
-
triage/confirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
agentscope-ai/agentscope#4563 ·
メンテナーはふだん 2 日以内に返信
-
comp/desktop desktop/chat P3 type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
NousResearch/hermes-agent#164451 ·
メンテナーはふだん 1 日以内に返信
-
external integration integration-submission
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
langchain-ai/docs#8426 ·
メンテナーはふだん 1 日以内に返信