picocode-core 0.9.197 → 0.9.198
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/catalog-snapshot.json +1 -1
- package/src/controller.js +26 -4
- package/src/daemon-runtime.js +169 -0
- package/src/daemon-transport.js +120 -0
- package/src/daemon-wire.js +43 -0
- package/src/remote-controller.js +136 -0
- package/src/session.js +5 -3
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"google":{"models":{"gemini-flash-latest":{"id":"gemini-flash-latest","name":"Gemini Flash Latest","description":"High-efficiency Gemini model for agentic workflows, coding, and multimodal reasoning","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2026-03","release_date":"2026-08-13","last_updated":"2026-08-13","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.75,"output":3.75,"cache_read":0.075,"input_audio":0.75}},"gemma-4-31b-it":{"id":"gemma-4-31b-it","name":"Gemma 4 31B IT","description":"Largest Gemma 4 instruction model for open, self-hosted chat and reasoning","family":"gemma","attachment":true,"reasoning":true,"reasoning_options":[{"type":"toggle"}],"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-04-02","last_updated":"2026-04-02","modalities":{"input":["text","image"],"output":["text"]},"open_weights":true,"limit":{"context":262144,"output":32768}},"gemini-omni-flash-preview":{"id":"gemini-omni-flash-preview","name":"Gemini Omni Flash Preview","description":"Video generation and editing model for fast, conversational text- and image-to-video workflows","family":"gemini","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":false,"temperature":true,"release_date":"2026-06-30","last_updated":"2026-06-30","modalities":{"input":["text","image","video"],"output":["video"]},"open_weights":false,"limit":{"context":131072,"output":65536},"cost":{"input":1.5,"output":17.5},"canonical_model_id":"google/gemini-omni-flash-preview"},"gemini-3.1-flash-image-preview":{"id":"gemini-3.1-flash-image-preview","name":"Nano Banana 2","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","high"]}],"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2026-02-26","last_updated":"2026-02-26","modalities":{"input":["text","image","pdf"],"output":["text","image"]},"open_weights":false,"limit":{"context":65536,"output":65536},"cost":{"input":0.5,"output":60}},"veo-3.1-lite-generate-preview":{"id":"veo-3.1-lite-generate-preview","name":"Veo 3.1 lite","description":"Video model for prompt-guided generation, editing, and motion workflows","family":"veo","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2026-03-31","last_updated":"2026-03-31","modalities":{"input":["text","image"],"output":["video"]},"open_weights":false,"limit":{"context":480,"output":8192},"canonical_model_id":"google/veo-3.1-lite-generate-preview"},"lyria-3-pro-preview":{"id":"lyria-3-pro-preview","name":"Lyria 3 Pro Preview","description":"Music generation model for full-length songs from text or images with vocals and structure","family":"lyria","attachment":true,"reasoning":false,"tool_call":false,"structured_output":false,"temperature":true,"release_date":"2026-03-25","last_updated":"2026-03-25","modalities":{"input":["text","image"],"output":["text","audio"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0,"output":0},"canonical_model_id":"google/lyria-3-pro-preview"},"gemini-3.1-flash-tts-preview":{"id":"gemini-3.1-flash-tts-preview","name":"Gemini 3.1 Flash TTS Preview","description":"Low-latency speech generation with steerable prompts and expressive audio tags","family":"gemini-flash","attachment":false,"reasoning":true,"reasoning_options":[],"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2026-04-15","last_updated":"2026-04-15","modalities":{"input":["text"],"output":["audio"]},"open_weights":false,"limit":{"context":8192,"output":16384},"cost":{"input":1,"output":20},"canonical_model_id":"google/gemini-3.1-flash-tts-preview"},"gemini-2.5-flash-image":{"id":"gemini-2.5-flash-image","name":"Nano Banana","description":"Nano Banana image model for fast generation, edits, and character-consistent assets","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":false,"temperature":true,"knowledge":"2024-06","release_date":"2025-08-26","last_updated":"2025-08-26","modalities":{"input":["text","image"],"output":["text","image"]},"open_weights":false,"limit":{"context":32768,"output":32768},"cost":{"input":0.3,"output":30,"cache_read":0.075},"canonical_model_id":"google/gemini-2.5-flash-image"},"gemini-flash-lite-latest":{"id":"gemini-flash-lite-latest","name":"Gemini Flash-Lite Latest","description":"Fast Gemini model balancing multimodal reasoning, tool use, and cost","family":"gemini-flash-lite","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2026-03","release_date":"2026-07-21","last_updated":"2026-07-21","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.3,"output":2.5,"cache_read":0.03}},"gemini-embedding-2":{"id":"gemini-embedding-2","name":"Gemini Embedding 2","description":"Multimodal embedding model mapping text, images, video, audio, and PDFs into a unified embedding space","family":"gemini","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"knowledge":"2025-11","release_date":"2026-04-22","last_updated":"2026-04-22","modalities":{"input":["text","image","audio","video","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":8192,"output":1},"cost":{"input":0.2,"output":0,"input_audio":6.5},"canonical_model_id":"google/gemini-embedding-2"},"gemini-3.6-flash":{"id":"gemini-3.6-flash","name":"Gemini 3.6 Flash","description":"Fast Gemini model balancing multimodal reasoning, tool use, and cost","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2026-03","release_date":"2026-07-21","last_updated":"2026-07-21","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.75,"output":3.75,"cache_read":0.075,"input_audio":0.75},"canonical_model_id":"google/gemini-3.6-flash"},"gemma-4-26b-a4b-it":{"id":"gemma-4-26b-a4b-it","name":"Gemma 4 26B A4B IT","description":"Open Gemma instruction model for efficient chat and self-hosted deployments","family":"gemma","attachment":true,"reasoning":true,"reasoning_options":[{"type":"toggle"}],"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-04-02","last_updated":"2026-04-02","modalities":{"input":["text","image"],"output":["text"]},"open_weights":true,"limit":{"context":262144,"output":32768}},"gemini-3-pro-image-preview":{"id":"gemini-3-pro-image-preview","name":"Nano Banana Pro","description":"Nano Banana Pro for higher-fidelity image generation and design-heavy edits","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2025-11-20","last_updated":"2025-11-20","modalities":{"input":["text","image"],"output":["text","image"]},"open_weights":false,"limit":{"context":131072,"output":32768},"cost":{"input":2,"output":120},"canonical_model_id":"google/gemini-3-pro-image-preview"},"gemini-2.5-pro-preview-tts":{"id":"gemini-2.5-pro-preview-tts","name":"Gemini 2.5 Pro Preview TTS","description":"Speech generation model for controllable voice, narration, and audio delivery","family":"gemini-flash","attachment":false,"reasoning":false,"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2025-05-01","last_updated":"2025-05-01","modalities":{"input":["text"],"output":["audio"]},"open_weights":false,"limit":{"context":8192,"output":16384},"cost":{"input":1,"output":20}},"gemini-3.5-flash-lite":{"id":"gemini-3.5-flash-lite","name":"Gemini 3.5 Flash Lite","description":"Fast Gemini model balancing multimodal reasoning, tool use, and cost","family":"gemini-flash-lite","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2026-03","release_date":"2026-07-21","last_updated":"2026-07-21","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.3,"output":2.5,"cache_read":0.03},"canonical_model_id":"google/gemini-3.5-flash-lite"},"gemini-3.1-flash-image":{"id":"gemini-3.1-flash-image","name":"Nano Banana 2","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","high"]}],"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2026-05-28","last_updated":"2026-05-28","modalities":{"input":["text","image","video","pdf"],"output":["text","image"]},"open_weights":false,"limit":{"context":131072,"output":32768},"cost":{"input":0.5,"output":60},"canonical_model_id":"google/gemini-3.1-flash-image"},"lyria-3-clip-preview":{"id":"lyria-3-clip-preview","name":"Lyria 3 Clip Preview","description":"Music generation model for short 30-second clips, loops, and previews from text or image prompts","family":"lyria","attachment":true,"reasoning":false,"tool_call":false,"structured_output":false,"temperature":true,"release_date":"2026-03-25","last_updated":"2026-03-25","modalities":{"input":["text","image"],"output":["text","audio"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0,"output":0},"canonical_model_id":"google/lyria-3-clip-preview"},"gemini-3.1-pro-preview":{"id":"gemini-3.1-pro-preview","name":"Gemini 3.1 Pro Preview","description":"Reasoning-first Gemini preview for agentic coding and complex problem solving","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2026-02-19","last_updated":"2026-02-19","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":2,"output":12,"cache_read":0.2,"tiers":[{"input":4,"output":18,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":4,"output":18,"cache_read":0.4}}},"gemini-2.5-computer-use-preview-10-2025":{"id":"gemini-2.5-computer-use-preview-10-2025","name":"Gemini 2.5 Computer Use Preview 10-2025","description":"Specialized Gemini 2.5 model for browser-control agents that automate UI tasks","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":true,"temperature":true,"knowledge":"2025-01","release_date":"2025-10-07","last_updated":"2025-10-07","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":64000},"cost":{"input":1.25,"output":10,"tiers":[{"input":2.5,"output":15,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":2.5,"output":15}},"canonical_model_id":"google/gemini-2.5-computer-use-preview-10-2025"},"gemini-3.5-flash":{"id":"gemini-3.5-flash","name":"Gemini 3.5 Flash","description":"Fast Gemini model balancing multimodal reasoning, tool use, and cost","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2026-05-19","last_updated":"2026-05-19","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":1.5,"output":9,"cache_read":0.15,"input_audio":1.5}},"gemini-2.5-pro":{"id":"gemini-2.5-pro","name":"Gemini 2.5 Pro","description":"Google's proven reasoning model for coding, math, and multimodal analysis","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"budget_tokens","min":128,"max":32768}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2025-06-17","last_updated":"2025-06-17","modalities":{"input":["text","image","audio","video","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":1.25,"output":10,"cache_read":0.125,"tiers":[{"input":2.5,"output":15,"cache_read":0.25,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":2.5,"output":15,"cache_read":0.25}},"canonical_model_id":"google/gemini-2.5-pro"},"gemini-3-pro-image":{"id":"gemini-3-pro-image","name":"Nano Banana Pro","description":"Nano Banana Pro for higher-fidelity image generation and design-heavy edits","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","high"]}],"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2026-05-28","last_updated":"2026-05-28","modalities":{"input":["text","image"],"output":["text","image"]},"open_weights":false,"limit":{"context":65536,"output":32768},"cost":{"input":2,"output":120},"canonical_model_id":"google/gemini-3-pro-image"},"gemini-2.5-flash":{"id":"gemini-2.5-flash","name":"Gemini 2.5 Flash","description":"Fast Gemini workhorse for multimodal apps where latency and price matter","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"toggle"},{"type":"budget_tokens","min":0,"max":24576}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2025-06-17","last_updated":"2025-06-17","modalities":{"input":["text","image","audio","video","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.3,"output":2.5,"cache_read":0.03,"input_audio":1},"canonical_model_id":"google/gemini-2.5-flash"},"gemini-2.5-flash-preview-tts":{"id":"gemini-2.5-flash-preview-tts","name":"Gemini 2.5 Flash Preview TTS","description":"Speech generation model for controllable voice, narration, and audio delivery","family":"gemini-flash","attachment":false,"reasoning":false,"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2025-05-01","last_updated":"2025-05-01","modalities":{"input":["text"],"output":["audio"]},"open_weights":false,"limit":{"context":8192,"output":16384},"cost":{"input":0.5,"output":10}},"gemini-3.1-flash-lite-image":{"id":"gemini-3.1-flash-lite-image","name":"Nano Banana 2 Lite","description":"Fastest, most cost-efficient Gemini image model for high-volume 1K generation and editing","family":"gemini-flash-lite","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","high"]}],"tool_call":true,"structured_output":false,"temperature":true,"knowledge":"2025-01","release_date":"2026-06-30","last_updated":"2026-06-30","modalities":{"input":["text","image"],"output":["text","image"]},"open_weights":false,"limit":{"context":65536,"output":4096},"cost":{"input":0.25,"output":30},"canonical_model_id":"google/gemini-3.1-flash-lite-image"},"deep-research-preview-04-2026":{"id":"deep-research-preview-04-2026","name":"Deep Research Preview (Apr-21-2026)","description":"Agentic model for autonomous multi-step research, synthesis, and cited reports","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":true,"temperature":true,"knowledge":"2025-01","release_date":"2026-04-21","last_updated":"2026-04-21","modalities":{"input":["text","image","video","audio","pdf"],"output":["text","image"]},"open_weights":false,"limit":{"context":131072,"output":65536},"cost":{"input":2,"output":12,"cache_read":0.2,"tiers":[{"input":4,"output":18,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":4,"output":18,"cache_read":0.4}},"canonical_model_id":"google/deep-research-preview-04-2026"},"deep-research-max-preview-04-2026":{"id":"deep-research-max-preview-04-2026","name":"Deep Research Max Preview (Apr-21-2026)","description":"Maximum-comprehensiveness agentic researcher for multi-step investigation, synthesis, and cited reports","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":true,"temperature":true,"knowledge":"2025-01","release_date":"2026-04-21","last_updated":"2026-04-21","modalities":{"input":["text","image","video","audio","pdf"],"output":["text","image"]},"open_weights":false,"limit":{"context":131072,"output":65536},"cost":{"input":2,"output":12,"cache_read":0.2,"tiers":[{"input":4,"output":18,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":4,"output":18,"cache_read":0.4}},"canonical_model_id":"google/deep-research-max-preview-04-2026"},"veo-3.1-fast-generate-preview":{"id":"veo-3.1-fast-generate-preview","name":"Veo 3.1 fast","description":"Video model for prompt-guided generation, editing, and motion workflows","family":"veo","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2025-10-15","last_updated":"2026-01-01","modalities":{"input":["text","image","video"],"output":["video"]},"open_weights":false,"limit":{"context":480,"output":8192},"canonical_model_id":"google/veo-3.1-fast-generate-preview"},"gemini-3.7-flash":{"id":"gemini-3.7-flash","name":"Gemini 3.7 Flash","description":"High-efficiency Gemini model for agentic workflows, coding, and multimodal reasoning","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2026-03","release_date":"2026-08-13","last_updated":"2026-08-13","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.75,"output":3.75,"cache_read":0.075,"input_audio":0.75},"canonical_model_id":"google/gemini-3.7-flash"},"veo-3.1-generate-preview":{"id":"veo-3.1-generate-preview","name":"Veo 3.1","description":"Video model for prompt-guided generation, editing, and motion workflows","family":"veo","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2025-10-15","last_updated":"2026-01","modalities":{"input":["text","image"],"output":["video"]},"open_weights":false,"limit":{"context":480,"output":8192},"status":"beta","canonical_model_id":"google/veo-3.1-generate-preview"},"gemini-3.1-pro-preview-customtools":{"id":"gemini-3.1-pro-preview-customtools","name":"Gemini 3.1 Pro Preview Custom Tools","description":"Advanced Gemini model for complex reasoning, coding, and multimodal analysis","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2026-02-19","last_updated":"2026-02-19","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":2,"output":12,"cache_read":0.2,"tiers":[{"input":4,"output":18,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":4,"output":18,"cache_read":0.4}}},"gemini-3-flash-preview":{"id":"gemini-3-flash-preview","name":"Gemini 3 Flash Preview","description":"New Gemini flash lane bringing frontier-style multimodal reasoning to cheaper runs","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2025-12-17","last_updated":"2025-12-17","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.5,"output":3,"cache_read":0.05,"input_audio":1}},"gemini-3.8-flash":{"id":"gemini-3.8-flash","name":"Gemini 3.8 Flash","description":"Google's most intelligent Flash model, engineered for long-horizon software engineering, autonomous agents, and complex enterprise workflows","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-09-02","last_updated":"2026-09-02","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.75,"output":3.75,"cache_read":0.075,"input_audio":0.75},"canonical_model_id":"google/gemini-3.8-flash"},"gemini-3.5-live-translate-preview":{"id":"gemini-3.5-live-translate-preview","name":"Gemini 3.5 Live Translate Preview","description":"Low-latency audio-to-audio model for real-time speech translation across 70+ languages","family":"gemini-pro","attachment":false,"reasoning":false,"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2026-06-09","last_updated":"2026-06-09","modalities":{"input":["audio"],"output":["audio","text"]},"open_weights":false,"limit":{"context":16384,"output":32768},"cost":{"input":3.5,"output":21,"input_audio":3.5,"output_audio":21},"canonical_model_id":"google/gemini-3.5-live-translate-preview"},"gemini-2.5-flash-lite":{"id":"gemini-2.5-flash-lite","name":"Gemini 2.5 Flash-Lite","description":"Lean Gemini 2.5 lane for cheap multimodal traffic and quick agents","family":"gemini-flash-lite","attachment":true,"reasoning":true,"reasoning_options":[{"type":"toggle"},{"type":"budget_tokens","min":512,"max":24576}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2025-06-17","last_updated":"2025-06-17","modalities":{"input":["text","image","audio","video","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.1,"output":0.4,"cache_read":0.01,"input_audio":0.3}},"gemini-embedding-001":{"id":"gemini-embedding-001","name":"Gemini Embedding 001","description":"Embedding model for semantic search, retrieval, clustering, and ranking pipelines","family":"gemini","attachment":false,"reasoning":false,"tool_call":false,"temperature":false,"knowledge":"2025-05","release_date":"2025-05-20","last_updated":"2025-05-20","modalities":{"input":["text"],"output":["text"]},"open_weights":false,"limit":{"context":2048,"output":1},"cost":{"input":0.15,"output":0}},"gemini-3.1-flash-lite-preview":{"id":"gemini-3.1-flash-lite-preview","name":"Gemini 3.1 Flash Lite Preview","description":"Legacy model retained for compatibility with older integrations","family":"gemini-flash-lite","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2026-03-03","last_updated":"2026-03-03","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"status":"deprecated","cost":{"input":0.25,"output":1.5,"cache_read":0.025,"input_audio":0.5}},"gemini-3.1-flash-live-preview":{"id":"gemini-3.1-flash-live-preview","name":"Gemini 3.1 Flash Live Preview","description":"High-quality, low-latency Live API model for real-time dialogue and voice-first AI applications","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":false,"temperature":true,"knowledge":"2025-01","release_date":"2026-03-26","last_updated":"2026-03-26","modalities":{"input":["text","image","video","audio"],"output":["text","audio"]},"open_weights":false,"limit":{"context":131072,"output":65536},"cost":{"input":0.75,"output":4.5,"input_audio":3,"output_audio":12},"canonical_model_id":"google/gemini-3.1-flash-live-preview"},"gemini-3.1-flash-lite":{"id":"gemini-3.1-flash-lite","name":"Gemini 3.1 Flash Lite","description":"Low-latency Gemini model for high-volume multimodal and agent workloads","family":"gemini-flash-lite","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2026-05-07","last_updated":"2026-05-07","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.25,"output":1.5,"cache_read":0.025,"input_audio":0.5}}}},"anthropic":{"models":{"claude-haiku-4-5":{"id":"claude-haiku-4-5","name":"Claude Haiku 4.5 (latest)","description":"Fast Claude lane for lightweight agents, office tasks, and responsive chat","family":"claude-haiku","attachment":true,"reasoning":true,"reasoning_options":[{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-02-28","release_date":"2025-10-15","last_updated":"2025-10-15","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":64000},"cost":{"input":1,"output":5,"cache_read":0.1,"cache_write":1.25},"canonical_model_id":"anthropic/claude-haiku-4-5"},"claude-opus-4-5":{"id":"claude-opus-4-5","name":"Claude Opus 4.5 (latest)","description":"Flagship Claude model for deep reasoning, coding, and long-horizon agents","family":"claude-opus","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]},{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-05","release_date":"2025-11-24","last_updated":"2025-11-24","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":64000},"cost":{"input":5,"output":25,"cache_read":0.5,"cache_write":6.25},"canonical_model_id":"anthropic/claude-opus-4-5"},"claude-sonnet-4-5":{"id":"claude-sonnet-4-5","name":"Claude Sonnet 4.5 (latest)","description":"Balanced Claude model for coding, analysis, agent workflows, and cost control","family":"claude-sonnet","attachment":true,"reasoning":true,"reasoning_options":[{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-07-31","release_date":"2025-09-29","last_updated":"2025-09-29","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":64000},"cost":{"input":3,"output":15,"cache_read":0.3,"cache_write":3.75},"canonical_model_id":"anthropic/claude-sonnet-4-5"},"claude-opus-5-5":{"id":"claude-opus-5-5","name":"Claude Opus 5.5","description":"Claude model for long-running agentic coding and knowledge work","family":"claude-opus","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-06","release_date":"2026-09-22","last_updated":"2026-09-22","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":8,"output":40,"cache_read":0.4,"cache_write":10},"provider":{"body":{"speed":"fast"},"headers":{"anthropic-beta":"fast-mode-2026-02-01"}}}}},"cost":{"input":4,"output":20,"cache_read":0.2,"cache_write":5},"canonical_model_id":"anthropic/claude-opus-5-5"},"claude-fable-5-1":{"id":"claude-fable-5-1","name":"Claude Fable 5.1","description":"Claude model for demanding reasoning and long-horizon agentic work","family":"claude-fable","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-06","release_date":"2026-09-01","last_updated":"2026-09-01","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"cost":{"input":10,"output":50,"cache_read":0.25,"cache_write":12.5},"canonical_model_id":"anthropic/claude-fable-5-1"},"claude-opus-4-5-20251101":{"id":"claude-opus-4-5-20251101","name":"Claude Opus 4.5","description":"Flagship Claude model for deep reasoning, coding, and long-horizon agents","family":"claude-opus","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]},{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-05","release_date":"2025-11-24","last_updated":"2025-11-01","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":64000},"cost":{"input":5,"output":25,"cache_read":0.5,"cache_write":6.25}},"claude-opus-5":{"id":"claude-opus-5","name":"Claude Opus 5","description":"Strongest Claude Opus model for coding, agents, and professional work","family":"claude-opus","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-05","release_date":"2026-07-24","last_updated":"2026-07-24","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":10,"output":50,"cache_read":1,"cache_write":12.5},"provider":{"body":{"speed":"fast"},"headers":{"anthropic-beta":"fast-mode-2026-02-01"}}}}},"cost":{"input":5,"output":25,"cache_read":0.5,"cache_write":6.25},"canonical_model_id":"anthropic/claude-opus-5"},"claude-fable-5":{"id":"claude-fable-5","name":"Claude Fable 5","description":"Claude model for creative writing, analysis, and controlled agent workflows","family":"claude-fable","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"release_date":"2026-06-07","last_updated":"2026-06-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"cost":{"input":10,"output":50,"cache_read":1,"cache_write":12.5}},"claude-opus-4-8":{"id":"claude-opus-4-8","name":"Claude Opus 4.8","description":"Top Claude Opus tier for the hardest reasoning, coding, and long-horizon agents","family":"claude-opus","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-01","release_date":"2026-05-28","last_updated":"2026-05-28","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":10,"output":50,"cache_read":1,"cache_write":12.5},"provider":{"body":{"speed":"fast"},"headers":{"anthropic-beta":"fast-mode-2026-02-01"}}}}},"cost":{"input":5,"output":25,"cache_read":0.5,"cache_write":6.25}},"claude-sonnet-4-5-20250929":{"id":"claude-sonnet-4-5-20250929","name":"Claude Sonnet 4.5","description":"Balanced Claude model for coding, analysis, agent workflows, and cost control","family":"claude-sonnet","attachment":true,"reasoning":true,"reasoning_options":[{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-07-31","release_date":"2025-09-29","last_updated":"2025-09-29","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":64000},"cost":{"input":3,"output":15,"cache_read":0.3,"cache_write":3.75}},"claude-sonnet-5":{"id":"claude-sonnet-5","name":"Claude Sonnet 5","description":"Everyday Claude agent model for coding, planning, browsing, and general work","family":"claude-sonnet","attachment":true,"reasoning":true,"reasoning_options":[{"type":"toggle"},{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-01-31","release_date":"2026-06-29","last_updated":"2026-06-30","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"cost":{"input":2,"output":10,"cache_read":0.2,"cache_write":2.5}},"claude-opus-4-6":{"id":"claude-opus-4-6","name":"Claude Opus 4.6","description":"High-end Claude for difficult coding, planning, and slower expert reasoning","family":"claude-opus","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","max"]},{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-05-31","release_date":"2026-02-04","last_updated":"2026-03-13","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"cost":{"input":5,"output":25,"cache_read":0.5,"cache_write":6.25}},"claude-haiku-4-5-20251001":{"id":"claude-haiku-4-5-20251001","name":"Claude Haiku 4.5","description":"Fast Claude model for responsive assistance, classification, and lightweight agents","family":"claude-haiku","attachment":true,"reasoning":true,"reasoning_options":[{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-02-28","release_date":"2025-10-15","last_updated":"2025-10-15","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":64000},"cost":{"input":1,"output":5,"cache_read":0.1,"cache_write":1.25}},"claude-sonnet-4-6":{"id":"claude-sonnet-4-6","name":"Claude Sonnet 4.6","description":"Claude workhorse for coding agents, careful analysis, and production cost control","family":"claude-sonnet","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","max"]},{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-08-31","release_date":"2026-02-17","last_updated":"2026-03-13","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"cost":{"input":3,"output":15,"cache_read":0.3,"cache_write":3.75}},"claude-sonnet-5-5":{"id":"claude-sonnet-5-5","name":"Claude Sonnet 5.5","description":"Fast Claude model for everyday coding, agents, and knowledge work","family":"claude-sonnet","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-06","release_date":"2026-09-28","last_updated":"2026-09-28","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"cost":{"input":2,"output":10,"cache_read":0.2,"cache_write":2.5},"canonical_model_id":"anthropic/claude-sonnet-5-5"},"claude-opus-4-7":{"id":"claude-opus-4-7","name":"Claude Opus 4.7","description":"Stronger Opus tier for advanced software work and high-stakes reasoning","family":"claude-opus","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-01-31","release_date":"2026-04-14","last_updated":"2026-04-16","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"cost":{"input":5,"output":25,"cache_read":0.5,"cache_write":6.25}}}},"openai":{"models":{"chatgpt-image-latest":{"id":"chatgpt-image-latest","name":"chatgpt-image-latest","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"gpt-image","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2025-12-16","last_updated":"2025-12-16","modalities":{"input":["text","image"],"output":["text","image"]},"open_weights":false,"limit":{"context":0,"input":0,"output":0}},"gpt-5.4":{"id":"gpt-5.4","name":"GPT-5.4","description":"Agent-ready GPT for coding and computer-use workflows at a lower cost","family":"gpt","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-08-31","release_date":"2026-03-05","last_updated":"2026-03-05","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":5,"output":30,"cache_read":0.5},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":2.5,"output":15,"cache_read":0.25,"tiers":[{"input":5,"output":22.5,"cache_read":0.5,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":5,"output":22.5,"cache_read":0.5}}},"gpt-5.4-pro":{"id":"gpt-5.4-pro","name":"GPT-5.4 Pro","description":"More exact GPT-5.4 tier for demanding professional reasoning and agent tasks","family":"gpt-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["medium","high","xhigh"]}],"tool_call":true,"structured_output":false,"temperature":false,"knowledge":"2025-08-31","release_date":"2026-03-05","last_updated":"2026-03-05","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"cost":{"input":30,"output":180,"tiers":[{"input":60,"output":270,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":60,"output":270}}},"gpt-3.5-turbo":{"id":"gpt-3.5-turbo","name":"GPT-3.5-turbo","description":"Compact GPT model for low-latency assistance and high-volume workloads","family":"gpt","attachment":false,"reasoning":false,"tool_call":false,"structured_output":false,"temperature":true,"knowledge":"2021-09-01","release_date":"2023-03-01","last_updated":"2023-11-06","modalities":{"input":["text"],"output":["text"]},"open_weights":false,"limit":{"context":16385,"output":4096},"status":"deprecated","cost":{"input":0.5,"output":1.5,"cache_read":0}},"gpt-5.5-pro":{"id":"gpt-5.5-pro","name":"GPT-5.5 Pro","description":"Highest-accuracy GPT-5.5 tier for slower, precision-heavy reasoning and coding","family":"gpt-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2025-12-01","release_date":"2026-04-23","last_updated":"2026-04-23","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"cost":{"input":30,"output":180,"tiers":[{"input":60,"output":270,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":60,"output":270}}},"text-embedding-3-small":{"id":"text-embedding-3-small","name":"text-embedding-3-small","description":"Embedding model for semantic search, retrieval, clustering, and ranking pipelines","family":"text-embedding","attachment":false,"reasoning":false,"tool_call":false,"temperature":false,"knowledge":"2024-01","release_date":"2024-01-25","last_updated":"2024-01-25","modalities":{"input":["text"],"output":["text"]},"open_weights":false,"limit":{"context":8191,"output":1536},"cost":{"input":0.02,"output":0}},"gpt-5.4-nano":{"id":"gpt-5.4-nano","name":"GPT-5.4 nano","description":"Cheapest GPT-5.4 lane for simple routing, extraction, and bulk automation","family":"gpt-nano","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-08-31","release_date":"2026-03-17","last_updated":"2026-03-17","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"flex":{"cost":{"input":0.1,"output":0.625,"cache_read":0.01},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":0.2,"output":1.25,"cache_read":0.02}},"gpt-realtime-2.1":{"id":"gpt-realtime-2.1","name":"GPT-Realtime-2.1","description":"Realtime speech-to-speech model with configurable reasoning, tool use, and robust voice-agent behavior","family":"gpt","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":false,"temperature":false,"knowledge":"2024-09-30","release_date":"2026-07-06","last_updated":"2026-07-06","modalities":{"input":["text","audio","image"],"output":["text","audio"]},"open_weights":false,"limit":{"context":128000,"input":96000,"output":32000},"cost":{"input":4,"output":24,"cache_read":0.4,"input_audio":32,"output_audio":64},"canonical_model_id":"openai/gpt-realtime-2.1"},"gpt-4o-2024-05-13":{"id":"gpt-4o-2024-05-13","name":"GPT-4o (2024-05-13)","description":"GPT model for general reasoning, writing, coding, and tool-assisted tasks","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2023-09","release_date":"2024-05-13","last_updated":"2024-05-13","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":4096},"status":"deprecated","experimental":{"modes":{"fast":{"cost":{"input":8.75,"output":26.25},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":5,"output":15}},"gpt-4o":{"id":"gpt-4o","name":"GPT-4o","description":"Omni-era GPT for multimodal chat, practical coding, and general assistants","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2023-09","release_date":"2024-05-13","last_updated":"2024-08-06","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":16384},"experimental":{"modes":{"fast":{"cost":{"input":4.25,"output":17,"cache_read":2.125},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":2.5,"output":10,"cache_read":1.25}},"gpt-5-mini":{"id":"gpt-5-mini","name":"GPT-5 Mini","description":"Small GPT-5 for responsive agents, coding help, and everyday automation","family":"gpt-mini","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-05-30","release_date":"2025-08-07","last_updated":"2025-08-07","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":0.45,"output":3.6,"cache_read":0.045},"provider":{"body":{"service_tier":"priority"}}},"flex":{"cost":{"input":0.125,"output":1,"cache_read":0.0125},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":0.25,"output":2,"cache_read":0.025}},"gpt-image-2":{"id":"gpt-image-2","name":"gpt-image-2","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"gpt-image","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2026-04-21","last_updated":"2026-04-21","modalities":{"input":["text","image"],"output":["image"]},"open_weights":false,"limit":{"context":0,"input":0,"output":0},"cost":{"input":5,"output":30,"cache_read":1.25},"canonical_model_id":"openai/gpt-image-2"},"gpt-5.2-pro":{"id":"gpt-5.2-pro","name":"GPT-5.2 Pro","description":"Higher-accuracy GPT-5.2 variant for tougher reasoning and review workflows","family":"gpt-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["medium","high","xhigh"]}],"tool_call":true,"structured_output":false,"temperature":false,"knowledge":"2025-08-31","release_date":"2025-12-11","last_updated":"2025-12-11","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"cost":{"input":21,"output":168}},"o4-mini":{"id":"o4-mini","name":"o4-mini","description":"Fast o-series model for compact reasoning, coding, and tool use","family":"o-mini","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-05","release_date":"2025-04-16","last_updated":"2025-04-16","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":100000},"status":"deprecated","experimental":{"modes":{"fast":{"cost":{"input":2,"output":8,"cache_read":0.5},"provider":{"body":{"service_tier":"priority"}}},"flex":{"cost":{"input":0.55,"output":2.2,"cache_read":0.138},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":1.1,"output":4.4,"cache_read":0.275}},"o3-mini":{"id":"o3-mini","name":"o3-mini","description":"Smaller o-series reasoner for economical coding, math, and planning tasks","family":"o-mini","attachment":false,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-05","release_date":"2024-12-20","last_updated":"2025-01-29","modalities":{"input":["text"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":100000},"status":"deprecated","cost":{"input":1.1,"output":4.4,"cache_read":0.55}},"text-embedding-ada-002":{"id":"text-embedding-ada-002","name":"text-embedding-ada-002","description":"Embedding model for semantic search, retrieval, clustering, and ranking pipelines","family":"text-embedding","attachment":false,"reasoning":false,"tool_call":false,"temperature":false,"knowledge":"2022-12","release_date":"2022-12-15","last_updated":"2022-12-15","modalities":{"input":["text"],"output":["text"]},"open_weights":false,"limit":{"context":8192,"output":1536},"cost":{"input":0.1,"output":0}},"gpt-4":{"id":"gpt-4","name":"GPT-4","description":"GPT model for general reasoning, writing, coding, and tool-assisted tasks","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":false,"temperature":true,"knowledge":"2023-11","release_date":"2023-11-06","last_updated":"2024-04-09","modalities":{"input":["text"],"output":["text"]},"open_weights":false,"limit":{"context":8192,"output":8192},"status":"deprecated","cost":{"input":30,"output":60}},"gpt-5.3-codex":{"id":"gpt-5.3-codex","name":"GPT-5.3 Codex","description":"Coding-optimized GPT model for repository edits, reviews, and agentic software work","family":"gpt-codex","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-08-31","release_date":"2026-02-05","last_updated":"2026-02-05","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":3.5,"output":28,"cache_read":0.35},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":1.75,"output":14,"cache_read":0.175}},"gpt-4.1-nano":{"id":"gpt-4.1-nano","name":"GPT-4.1 nano","description":"Tiny GPT-4.1 option for classification, routing, and very high-volume tasks","family":"gpt-nano","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2024-04","release_date":"2025-04-14","last_updated":"2025-04-14","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":1047576,"output":32768},"status":"deprecated","experimental":{"modes":{"fast":{"cost":{"input":0.2,"output":0.8,"cache_read":0.05},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":0.1,"output":0.4,"cache_read":0.025}},"gpt-5-nano":{"id":"gpt-5-nano","name":"GPT-5 Nano","description":"Tiny GPT-5 lane for routing, extraction, classification, and bulk jobs","family":"gpt-nano","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-05-30","release_date":"2025-08-07","last_updated":"2025-08-07","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"flex":{"cost":{"input":0.025,"output":0.2,"cache_read":0.0025},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":0.05,"output":0.4,"cache_read":0.005}},"gpt-5.6":{"id":"gpt-5.6","name":"GPT-5.6","description":"Frontier GPT-5.6 model for complex professional work, coding, and agentic workflows","family":"gpt-sol","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-02-16","release_date":"2026-07-09","last_updated":"2026-07-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":8,"output":40,"cache_read":0.8,"cache_write":10},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}}}},"cost":{"input":4,"output":20,"cache_read":0.4,"cache_write":5,"tiers":[{"input":8,"output":30,"cache_read":0.8,"cache_write":10,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":8,"output":30,"cache_read":0.8,"cache_write":10}},"canonical_model_id":"openai/gpt-5.6-sol"},"gpt-5.2-chat-latest":{"id":"gpt-5.2-chat-latest","name":"GPT-5.2 Chat","description":"Chat-tuned GPT model for conversational assistance, writing, and tool workflows","family":"gpt-codex","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["medium"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2025-08-31","release_date":"2025-12-11","last_updated":"2025-12-11","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":16384},"status":"deprecated","cost":{"input":1.75,"output":14,"cache_read":0.175}},"o1":{"id":"o1","name":"o1","description":"O-series reasoning model for hard analysis, math, coding, and planning","family":"o","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2023-09","release_date":"2024-12-05","last_updated":"2024-12-05","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":100000},"status":"deprecated","cost":{"input":15,"output":60,"cache_read":7.5}},"gpt-5-pro":{"id":"gpt-5-pro","name":"GPT-5 Pro","description":"Higher-accuracy GPT-5 tier for tough analysis, coding reviews, and planning","family":"gpt-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-09-30","release_date":"2025-10-06","last_updated":"2025-10-06","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":272000},"cost":{"input":15,"output":120}},"gpt-5.3-codex-spark":{"id":"gpt-5.3-codex-spark","name":"GPT-5.3 Codex Spark","description":"Coding-optimized GPT model for repository edits, reviews, and agentic software work","family":"gpt-codex-spark","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2025-08-31","release_date":"2026-02-05","last_updated":"2026-02-05","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"input":100000,"output":32000},"cost":{"input":1.75,"output":14,"cache_read":0.175}},"gpt-6.1-sol":{"id":"gpt-6.1-sol","name":"GPT-6.1 Sol","description":"Near-Astra performance for complex coding, computer use, and professional work at a lower cost.","family":"gpt-sol","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-04-30","release_date":"2026-09-29","last_updated":"2026-09-29","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":4,"output":20,"cache_read":0.2,"cache_write":5},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}}}},"cost":{"input":2,"output":10,"cache_read":0.1,"cache_write":2.5,"tiers":[{"input":4,"output":15,"cache_read":0.2,"cache_write":5,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":4,"output":15,"cache_read":0.2,"cache_write":5}},"canonical_model_id":"openai/gpt-6.1-sol"},"text-embedding-3-large":{"id":"text-embedding-3-large","name":"text-embedding-3-large","description":"Embedding model for semantic search, retrieval, clustering, and ranking pipelines","family":"text-embedding","attachment":false,"reasoning":false,"tool_call":false,"temperature":false,"knowledge":"2024-01","release_date":"2024-01-25","last_updated":"2024-01-25","modalities":{"input":["text"],"output":["text"]},"open_weights":false,"limit":{"context":8191,"output":3072},"cost":{"input":0.13,"output":0}},"gpt-4o-2024-08-06":{"id":"gpt-4o-2024-08-06","name":"GPT-4o (2024-08-06)","description":"GPT model for general reasoning, writing, coding, and tool-assisted tasks","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2023-09","release_date":"2024-08-06","last_updated":"2024-08-06","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":16384},"cost":{"input":2.5,"output":10,"cache_read":1.25}},"gpt-6-astra":{"id":"gpt-6-astra","name":"GPT-6 Astra","description":"GPT-6 Astra is OpenAI's most capable model for complex reasoning, coding, computer use, research, and document creation.","family":"gpt-astra","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-04-30","release_date":"2026-09-04","last_updated":"2026-09-04","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":20,"output":100,"cache_read":2,"cache_write":25},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}},"ultrafast":{"cost":{"input":60,"output":300,"cache_read":6,"cache_write":75},"provider":{"body":{"service_tier":"ultrafast"}}}}},"cost":{"input":10,"output":50,"cache_read":1,"cache_write":12.5,"tiers":[{"input":20,"output":75,"cache_read":2,"cache_write":25,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":20,"output":75,"cache_read":2,"cache_write":25}},"canonical_model_id":"openai/gpt-6-astra"},"gpt-5.1":{"id":"gpt-5.1","name":"GPT-5.1","description":"Sharper GPT-5 generation for coding, product work, and tool-assisted tasks","family":"gpt","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2024-09-30","release_date":"2025-11-13","last_updated":"2025-11-13","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":2.5,"output":20,"cache_read":0.25},"provider":{"body":{"service_tier":"priority"}}},"flex":{"cost":{"input":0.625,"output":5,"cache_read":0.0625},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":1.25,"output":10,"cache_read":0.125}},"gpt-4o-mini":{"id":"gpt-4o-mini","name":"GPT-4o mini","description":"Small omni GPT for cheap multimodal assistance and production-scale traffic","family":"gpt-mini","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2023-09","release_date":"2024-07-18","last_updated":"2024-07-18","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":16384},"experimental":{"modes":{"fast":{"cost":{"input":0.25,"output":1,"cache_read":0.125},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":0.15,"output":0.6,"cache_read":0.075}},"o3-pro":{"id":"o3-pro","name":"o3-pro","description":"High-effort o3 tier for difficult technical reasoning and careful answers","family":"o-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-05","release_date":"2025-06-10","last_updated":"2025-06-10","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":100000},"cost":{"input":20,"output":80}},"gpt-image-1":{"id":"gpt-image-1","name":"gpt-image-1","description":"OpenAI image model for production generation, edits, and brand-safe visual workflows","family":"gpt-image","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2025-04-24","last_updated":"2025-04-24","modalities":{"input":["text","image"],"output":["image"]},"open_weights":false,"limit":{"context":0,"input":0,"output":0},"status":"deprecated","canonical_model_id":"openai/gpt-image-1"},"gpt-daybreak-blue-latest":{"id":"gpt-daybreak-blue-latest","name":"Daybreak Blue","description":"Alias for flagship general-purpose models with safeguards for defensive cybersecurity work","family":"gpt-sol","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-02-16","release_date":"2026-08-07","last_updated":"2026-08-07","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"cost":{"input":4,"output":20,"cache_read":0.4,"cache_write":5,"tiers":[{"input":8,"output":30,"cache_read":0.8,"cache_write":10,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":8,"output":30,"cache_read":0.8,"cache_write":10}},"canonical_model_id":"openai/gpt-5.6-sol"},"gpt-5.4-mini":{"id":"gpt-5.4-mini","name":"GPT-5.4 mini","description":"Strong small GPT for coding subagents, quick tool use, and high-volume work","family":"gpt-mini","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-08-31","release_date":"2026-03-17","last_updated":"2026-03-17","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":1.5,"output":9,"cache_read":0.15},"provider":{"body":{"service_tier":"priority"}}},"flex":{"cost":{"input":0.375,"output":2.25,"cache_read":0.0375},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":0.75,"output":4.5,"cache_read":0.075}},"gpt-5.6-luna":{"id":"gpt-5.6-luna","name":"GPT-5.6 Luna","description":"Cost-efficient GPT-5.6 model for fast, high-volume workloads","family":"gpt-luna","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-02-16","release_date":"2026-07-09","last_updated":"2026-07-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":0.4,"output":2.4,"cache_read":0.04,"cache_write":0.5},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}}}},"cost":{"input":0.2,"output":1.2,"cache_read":0.02,"cache_write":0.25,"tiers":[{"input":0.4,"output":1.8,"cache_read":0.04,"cache_write":0.5,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":0.4,"output":1.8,"cache_read":0.04,"cache_write":0.5}},"canonical_model_id":"openai/gpt-5.6-luna"},"gpt-5.2":{"id":"gpt-5.2","name":"GPT-5.2","description":"Reliable GPT generation for broad coding, writing, and tool-assisted product work","family":"gpt","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-08-31","release_date":"2025-12-11","last_updated":"2025-12-11","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":3.5,"output":28,"cache_read":0.35},"provider":{"body":{"service_tier":"priority"}}},"flex":{"cost":{"input":0.875,"output":7,"cache_read":0.0875},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":1.75,"output":14,"cache_read":0.175}},"gpt-5.5":{"id":"gpt-5.5","name":"GPT-5.5","description":"Default frontier GPT for coding, computer use, research, and knowledge work","family":"gpt","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2025-12-01","release_date":"2026-04-23","last_updated":"2026-04-23","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":12.5,"output":75,"cache_read":1.25},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":5,"output":30,"cache_read":0.5,"tiers":[{"input":10,"output":45,"cache_read":1,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":10,"output":45,"cache_read":1}}},"gpt-4.1":{"id":"gpt-4.1","name":"GPT-4.1","description":"Long-lived GPT workhorse for coding, instruction following, and production apps","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2024-04","release_date":"2025-04-14","last_updated":"2025-04-14","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1047576,"output":32768},"experimental":{"modes":{"fast":{"cost":{"input":3.5,"output":14,"cache_read":0.875},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":2,"output":8,"cache_read":0.5}},"gpt-4o-2024-11-20":{"id":"gpt-4o-2024-11-20","name":"GPT-4o (2024-11-20)","description":"GPT model for general reasoning, writing, coding, and tool-assisted tasks","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2023-09","release_date":"2024-11-20","last_updated":"2024-11-20","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":16384},"cost":{"input":2.5,"output":10,"cache_read":1.25}},"gpt-4.1-mini":{"id":"gpt-4.1-mini","name":"GPT-4.1 mini","description":"Affordable GPT-4.1 lane for fast coding help and structured extraction","family":"gpt-mini","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2024-04","release_date":"2025-04-14","last_updated":"2025-04-14","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1047576,"output":32768},"experimental":{"modes":{"fast":{"cost":{"input":0.7,"output":2.8,"cache_read":0.175},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":0.4,"output":1.6,"cache_read":0.1}},"gpt-6-luna":{"id":"gpt-6-luna","name":"GPT-6 Luna","description":"OpenAI's most efficient model for focused, high-volume tasks","family":"gpt-luna","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-05-18","release_date":"2026-09-22","last_updated":"2026-09-22","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":0.2,"output":1,"cache_read":0.02,"cache_write":0.25},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}}}},"cost":{"input":0.1,"output":0.5,"cache_read":0.01,"cache_write":0.125,"tiers":[{"input":0.2,"output":0.75,"cache_read":0.02,"cache_write":0.25,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":0.2,"output":0.75,"cache_read":0.02,"cache_write":0.25}},"canonical_model_id":"openai/gpt-6-luna"},"gpt-5.3-chat-latest":{"id":"gpt-5.3-chat-latest","name":"GPT-5.3 Chat (latest)","description":"Chat-tuned GPT model for conversational assistance, writing, and tool workflows","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-08-31","release_date":"2026-03-03","last_updated":"2026-03-03","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":16384},"status":"deprecated","cost":{"input":1.75,"output":14,"cache_read":0.175}},"gpt-image-1-mini":{"id":"gpt-image-1-mini","name":"gpt-image-1-mini","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"gpt-image","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2025-09-26","last_updated":"2025-09-26","modalities":{"input":["text","image"],"output":["text","image"]},"open_weights":false,"limit":{"context":0,"input":0,"output":0}},"gpt-image-1.5":{"id":"gpt-image-1.5","name":"gpt-image-1.5","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"gpt-image","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2025-11-25","last_updated":"2025-11-25","modalities":{"input":["text","image"],"output":["text","image"]},"open_weights":false,"limit":{"context":0,"input":0,"output":0},"canonical_model_id":"openai/gpt-image-1.5"},"gpt-5.6-terra":{"id":"gpt-5.6-terra","name":"GPT-5.6 Terra","description":"Balanced GPT-5.6 model for capable, cost-efficient everyday work","family":"gpt-terra","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-02-16","release_date":"2026-07-09","last_updated":"2026-07-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":4,"output":24,"cache_read":0.4,"cache_write":5},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}}}},"cost":{"input":2,"output":12,"cache_read":0.2,"cache_write":2.5,"tiers":[{"input":4,"output":18,"cache_read":0.4,"cache_write":5,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":4,"output":18,"cache_read":0.4,"cache_write":5}},"canonical_model_id":"openai/gpt-5.6-terra"},"gpt-4-turbo":{"id":"gpt-4-turbo","name":"GPT-4 Turbo","description":"Compact GPT model for low-latency assistance and high-volume workloads","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":false,"temperature":true,"knowledge":"2023-12","release_date":"2023-11-06","last_updated":"2024-04-09","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":4096},"status":"deprecated","cost":{"input":10,"output":30}},"gpt-daybreak-red-latest":{"id":"gpt-daybreak-red-latest","name":"Daybreak Red","description":"Alias for advanced cybersecurity models for authorized vulnerability research and security testing","family":"gpt","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-02-16","release_date":"2026-08-07","last_updated":"2026-08-07","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"cost":{"input":12.5,"output":75,"cache_read":1.25,"cache_write":15.625},"canonical_model_id":"openai/gpt-5.6-cyber"},"o3":{"id":"o3","name":"o3","description":"Deliberate o-series reasoner for hard math, coding, and multi-step analysis","family":"o","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-05","release_date":"2025-04-16","last_updated":"2025-04-16","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":100000},"experimental":{"modes":{"fast":{"cost":{"input":3.5,"output":14,"cache_read":0.875},"provider":{"body":{"service_tier":"priority"}}},"flex":{"cost":{"input":1,"output":4,"cache_read":0.25},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":2,"output":8,"cache_read":0.5}},"gpt-5":{"id":"gpt-5","name":"GPT-5","description":"Original GPT-5 workhorse for reasoning, coding, writing, and tool workflows","family":"gpt","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-09-30","release_date":"2025-08-07","last_updated":"2025-08-07","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":2.5,"output":20,"cache_read":0.25},"provider":{"body":{"service_tier":"priority"}}},"flex":{"cost":{"input":0.625,"output":5,"cache_read":0.0625},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":1.25,"output":10,"cache_read":0.125},"canonical_model_id":"openai/gpt-5"},"gpt-5.6-sol":{"id":"gpt-5.6-sol","name":"GPT-5.6 Sol","description":"Frontier GPT-5.6 model for complex professional work, coding, and agentic workflows","family":"gpt-sol","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-02-16","release_date":"2026-07-09","last_updated":"2026-07-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":8,"output":40,"cache_read":0.8,"cache_write":10},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}}}},"cost":{"input":4,"output":20,"cache_read":0.4,"cache_write":5,"tiers":[{"input":8,"output":30,"cache_read":0.8,"cache_write":10,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":8,"output":30,"cache_read":0.8,"cache_write":10}},"canonical_model_id":"openai/gpt-5.6-sol"},"gpt-6-sol":{"id":"gpt-6-sol","name":"GPT-6 Sol","description":"OpenAI model for complex coding and agentic workflows","family":"gpt-sol","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-04-20","release_date":"2026-09-22","last_updated":"2026-09-22","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":4,"output":20,"cache_read":0.4,"cache_write":5},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}}}},"cost":{"input":2,"output":10,"cache_read":0.2,"cache_write":2.5,"tiers":[{"input":4,"output":15,"cache_read":0.4,"cache_write":5,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":4,"output":15,"cache_read":0.4,"cache_write":5}},"canonical_model_id":"openai/gpt-6-sol"},"o1-pro":{"id":"o1-pro","name":"o1-pro","description":"O-series reasoning model for hard analysis, math, coding, and planning","family":"o-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2023-09","release_date":"2025-03-19","last_updated":"2025-03-19","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":100000},"status":"deprecated","cost":{"input":150,"output":600}}}},"xai":{"models":{"grok-4.7":{"id":"grok-4.7","name":"Grok 4.7","description":"xAI's frontier model for long-running agents, coding, knowledge work, and visual projects","family":"grok","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2026-05","release_date":"2026-09-21","last_updated":"2026-09-21","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":500000,"output":500000},"cost":{"input":2,"output":6,"cache_read":0.5,"tiers":[{"input":4,"output":12,"cache_read":1,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":4,"output":12,"cache_read":1}},"canonical_model_id":"xai/grok-4.7"},"grok-imagine-video-1.5-lite":{"id":"grok-imagine-video-1.5-lite","name":"Grok Imagine Video 1.5 Lite","description":"Cost-efficient video model for text-to-video and image-to-video generation","family":"grok","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2026-10-01","last_updated":"2026-10-01","modalities":{"input":["text","image"],"output":["video"]},"open_weights":false,"limit":{"context":1024,"output":0},"canonical_model_id":"xai/grok-imagine-video-1.5-lite"},"grok-imagine-image":{"id":"grok-imagine-image","name":"Grok Imagine Image","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"grok","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2026-01-28","last_updated":"2026-01-28","modalities":{"input":["text","image","pdf"],"output":["image","pdf"]},"open_weights":false,"limit":{"context":16000,"output":0}},"grok-imagine-video":{"id":"grok-imagine-video","name":"Grok Imagine Video","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"grok","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2026-01-28","last_updated":"2026-01-28","modalities":{"input":["text","image","video","pdf"],"output":["video"]},"open_weights":false,"limit":{"context":1024,"output":0}},"grok-4.3":{"id":"grok-4.3","name":"Grok 4.3","description":"xAI's Grok for chat, coding, agentic tools, and lower hallucination risk","family":"grok","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-04-17","last_updated":"2026-04-17","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":30000},"cost":{"input":1.25,"output":2.5,"cache_read":0.2,"tiers":[{"input":2.5,"output":5,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":2.5,"output":5,"cache_read":0.4}}},"grok-4.20-0309-reasoning":{"id":"grok-4.20-0309-reasoning","name":"Grok 4.20 (Reasoning)","description":"Reasoning Grok for document-heavy analysis and long-horizon tool use","family":"grok","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-03-09","last_updated":"2026-03-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":30000},"cost":{"input":1.25,"output":2.5,"cache_read":0.2,"tiers":[{"input":2.5,"output":5,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":2.5,"output":5,"cache_read":0.4}}},"grok-imagine-video-1.5":{"id":"grok-imagine-video-1.5","name":"Grok Imagine Video 1.5","description":"Video model for image-to-video generation, editing, and extension workflows","family":"grok","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2026-05-30","last_updated":"2026-05-30","modalities":{"input":["text","image","audio","pdf"],"output":["video"]},"open_weights":false,"limit":{"context":1024,"output":0},"canonical_model_id":"xai/grok-imagine-video-1.5"},"grok-4.5":{"id":"grok-4.5","name":"Grok 4.5","description":"xAI's Grok model for chat, coding, agentic tools, and lower hallucination risk","family":"grok","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-07-08","last_updated":"2026-07-08","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":500000,"output":500000},"cost":{"input":2,"output":6,"cache_read":0.3,"tiers":[{"input":4,"output":12,"cache_read":0.6,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":4,"output":12,"cache_read":0.6}},"canonical_model_id":"xai/grok-4.5"},"grok-4.20-0309-non-reasoning":{"id":"grok-4.20-0309-non-reasoning","name":"Grok 4.20 (Non-Reasoning)","description":"Grok model for agentic tool use, reasoning, coding, and live assistance","family":"grok","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-03-09","last_updated":"2026-03-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":30000},"cost":{"input":1.25,"output":2.5,"cache_read":0.2,"tiers":[{"input":2.5,"output":5,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":2.5,"output":5,"cache_read":0.4}}},"grok-imagine-image-quality":{"id":"grok-imagine-image-quality","name":"Grok Imagine Image Quality","description":"Higher-fidelity Grok Imagine image model for prompt-driven generation, editing, and visual design workflows","family":"grok","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2026-04-03","last_updated":"2026-04-03","modalities":{"input":["text","image","pdf"],"output":["image","pdf"]},"open_weights":false,"limit":{"context":16000,"output":0},"canonical_model_id":"xai/grok-imagine-image-quality"},"grok-build-0.1":{"id":"grok-build-0.1","name":"Grok Build 0.1","description":"Fast Grok coding model tuned for agentic engineering and iterative edits","family":"grok-build","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-04-16","last_updated":"2026-04-16","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":256000,"output":256000},"cost":{"input":1,"output":2,"cache_read":0.2,"tiers":[{"input":2,"output":4,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":2,"output":4,"cache_read":0.4}}},"grok-4.20-multi-agent-0309":{"id":"grok-4.20-multi-agent-0309","name":"Grok 4.20 Multi-Agent","description":"Grok model for agentic tool use, reasoning, coding, and live assistance","family":"grok","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh"]}],"tool_call":false,"structured_output":true,"temperature":true,"release_date":"2026-03-09","last_updated":"2026-03-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":30000},"cost":{"input":1.25,"output":2.5,"cache_read":0.2,"tiers":[{"input":2.5,"output":5,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":2.5,"output":5,"cache_read":0.4}}},"grok-4.6":{"id":"grok-4.6","name":"Grok 4.6","description":"xAI's frontier model for long-running agents, coding, knowledge work, and visual projects","family":"grok","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2026-02-01","release_date":"2026-08-12","last_updated":"2026-08-12","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":500000,"output":500000},"cost":{"input":2,"output":6,"cache_read":0.5,"tiers":[{"input":4,"output":12,"cache_read":1,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":4,"output":12,"cache_read":1}},"canonical_model_id":"xai/grok-4.6"}}}}
|
|
1
|
+
{"google":{"models":{"gemini-flash-latest":{"id":"gemini-flash-latest","name":"Gemini Flash Latest","description":"High-efficiency Gemini model for agentic workflows, coding, and multimodal reasoning","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2026-03","release_date":"2026-08-13","last_updated":"2026-08-13","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.75,"output":3.75,"cache_read":0.075,"input_audio":0.75}},"gemma-4-31b-it":{"id":"gemma-4-31b-it","name":"Gemma 4 31B IT","description":"Largest Gemma 4 instruction model for open, self-hosted chat and reasoning","family":"gemma","attachment":true,"reasoning":true,"reasoning_options":[{"type":"toggle"}],"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-04-02","last_updated":"2026-04-02","modalities":{"input":["text","image"],"output":["text"]},"open_weights":true,"limit":{"context":262144,"output":32768}},"gemini-omni-flash-preview":{"id":"gemini-omni-flash-preview","name":"Gemini Omni Flash Preview","description":"Video generation and editing model for fast, conversational text- and image-to-video workflows","family":"gemini","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":false,"temperature":true,"release_date":"2026-06-30","last_updated":"2026-06-30","modalities":{"input":["text","image","video"],"output":["video"]},"open_weights":false,"limit":{"context":131072,"output":65536},"cost":{"input":1.5,"output":17.5},"canonical_model_id":"google/gemini-omni-flash-preview"},"gemini-3.1-flash-image-preview":{"id":"gemini-3.1-flash-image-preview","name":"Nano Banana 2","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","high"]}],"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2026-02-26","last_updated":"2026-02-26","modalities":{"input":["text","image","pdf"],"output":["text","image"]},"open_weights":false,"limit":{"context":65536,"output":65536},"cost":{"input":0.5,"output":60}},"veo-3.1-lite-generate-preview":{"id":"veo-3.1-lite-generate-preview","name":"Veo 3.1 lite","description":"Video model for prompt-guided generation, editing, and motion workflows","family":"veo","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2026-03-31","last_updated":"2026-03-31","modalities":{"input":["text","image"],"output":["video"]},"open_weights":false,"limit":{"context":480,"output":8192},"canonical_model_id":"google/veo-3.1-lite-generate-preview"},"lyria-3-pro-preview":{"id":"lyria-3-pro-preview","name":"Lyria 3 Pro Preview","description":"Music generation model for full-length songs from text or images with vocals and structure","family":"lyria","attachment":true,"reasoning":false,"tool_call":false,"structured_output":false,"temperature":true,"release_date":"2026-03-25","last_updated":"2026-03-25","modalities":{"input":["text","image"],"output":["text","audio"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0,"output":0},"canonical_model_id":"google/lyria-3-pro-preview"},"gemini-3.1-flash-tts-preview":{"id":"gemini-3.1-flash-tts-preview","name":"Gemini 3.1 Flash TTS Preview","description":"Low-latency speech generation with steerable prompts and expressive audio tags","family":"gemini-flash","attachment":false,"reasoning":true,"reasoning_options":[],"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2026-04-15","last_updated":"2026-04-15","modalities":{"input":["text"],"output":["audio"]},"open_weights":false,"limit":{"context":8192,"output":16384},"cost":{"input":1,"output":20},"canonical_model_id":"google/gemini-3.1-flash-tts-preview"},"gemini-2.5-flash-image":{"id":"gemini-2.5-flash-image","name":"Nano Banana","description":"Nano Banana image model for fast generation, edits, and character-consistent assets","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":false,"temperature":true,"knowledge":"2024-06","release_date":"2025-08-26","last_updated":"2025-08-26","modalities":{"input":["text","image"],"output":["text","image"]},"open_weights":false,"limit":{"context":32768,"output":32768},"cost":{"input":0.3,"output":30,"cache_read":0.075},"canonical_model_id":"google/gemini-2.5-flash-image"},"gemini-flash-lite-latest":{"id":"gemini-flash-lite-latest","name":"Gemini Flash-Lite Latest","description":"Fast Gemini model balancing multimodal reasoning, tool use, and cost","family":"gemini-flash-lite","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2026-03","release_date":"2026-07-21","last_updated":"2026-07-21","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.3,"output":2.5,"cache_read":0.03}},"gemini-embedding-2":{"id":"gemini-embedding-2","name":"Gemini Embedding 2","description":"Multimodal embedding model mapping text, images, video, audio, and PDFs into a unified embedding space","family":"gemini","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"knowledge":"2025-11","release_date":"2026-04-22","last_updated":"2026-04-22","modalities":{"input":["text","image","audio","video","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":8192,"output":1},"cost":{"input":0.2,"output":0,"input_audio":6.5},"canonical_model_id":"google/gemini-embedding-2"},"gemini-3.6-flash":{"id":"gemini-3.6-flash","name":"Gemini 3.6 Flash","description":"Fast Gemini model balancing multimodal reasoning, tool use, and cost","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2026-03","release_date":"2026-07-21","last_updated":"2026-07-21","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.75,"output":3.75,"cache_read":0.075,"input_audio":0.75},"canonical_model_id":"google/gemini-3.6-flash"},"gemma-4-26b-a4b-it":{"id":"gemma-4-26b-a4b-it","name":"Gemma 4 26B A4B IT","description":"Open Gemma instruction model for efficient chat and self-hosted deployments","family":"gemma","attachment":true,"reasoning":true,"reasoning_options":[{"type":"toggle"}],"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-04-02","last_updated":"2026-04-02","modalities":{"input":["text","image"],"output":["text"]},"open_weights":true,"limit":{"context":262144,"output":32768}},"gemini-3-pro-image-preview":{"id":"gemini-3-pro-image-preview","name":"Nano Banana Pro","description":"Nano Banana Pro for higher-fidelity image generation and design-heavy edits","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2025-11-20","last_updated":"2025-11-20","modalities":{"input":["text","image"],"output":["text","image"]},"open_weights":false,"limit":{"context":131072,"output":32768},"cost":{"input":2,"output":120},"canonical_model_id":"google/gemini-3-pro-image-preview"},"gemini-2.5-pro-preview-tts":{"id":"gemini-2.5-pro-preview-tts","name":"Gemini 2.5 Pro Preview TTS","description":"Speech generation model for controllable voice, narration, and audio delivery","family":"gemini-flash","attachment":false,"reasoning":false,"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2025-05-01","last_updated":"2025-05-01","modalities":{"input":["text"],"output":["audio"]},"open_weights":false,"limit":{"context":8192,"output":16384},"cost":{"input":1,"output":20}},"gemini-3.5-flash-lite":{"id":"gemini-3.5-flash-lite","name":"Gemini 3.5 Flash Lite","description":"Fast Gemini model balancing multimodal reasoning, tool use, and cost","family":"gemini-flash-lite","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2026-03","release_date":"2026-07-21","last_updated":"2026-07-21","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.3,"output":2.5,"cache_read":0.03},"canonical_model_id":"google/gemini-3.5-flash-lite"},"gemini-3.1-flash-image":{"id":"gemini-3.1-flash-image","name":"Nano Banana 2","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","high"]}],"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2026-05-28","last_updated":"2026-05-28","modalities":{"input":["text","image","video","pdf"],"output":["text","image"]},"open_weights":false,"limit":{"context":131072,"output":32768},"cost":{"input":0.5,"output":60},"canonical_model_id":"google/gemini-3.1-flash-image"},"lyria-3-clip-preview":{"id":"lyria-3-clip-preview","name":"Lyria 3 Clip Preview","description":"Music generation model for short 30-second clips, loops, and previews from text or image prompts","family":"lyria","attachment":true,"reasoning":false,"tool_call":false,"structured_output":false,"temperature":true,"release_date":"2026-03-25","last_updated":"2026-03-25","modalities":{"input":["text","image"],"output":["text","audio"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0,"output":0},"canonical_model_id":"google/lyria-3-clip-preview"},"gemini-3.1-pro-preview":{"id":"gemini-3.1-pro-preview","name":"Gemini 3.1 Pro Preview","description":"Reasoning-first Gemini preview for agentic coding and complex problem solving","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2026-02-19","last_updated":"2026-02-19","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":2,"output":12,"cache_read":0.2,"tiers":[{"input":4,"output":18,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":4,"output":18,"cache_read":0.4}}},"gemini-2.5-computer-use-preview-10-2025":{"id":"gemini-2.5-computer-use-preview-10-2025","name":"Gemini 2.5 Computer Use Preview 10-2025","description":"Specialized Gemini 2.5 model for browser-control agents that automate UI tasks","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":true,"temperature":true,"knowledge":"2025-01","release_date":"2025-10-07","last_updated":"2025-10-07","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":64000},"cost":{"input":1.25,"output":10,"tiers":[{"input":2.5,"output":15,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":2.5,"output":15}},"canonical_model_id":"google/gemini-2.5-computer-use-preview-10-2025"},"gemini-3.5-flash":{"id":"gemini-3.5-flash","name":"Gemini 3.5 Flash","description":"Fast Gemini model balancing multimodal reasoning, tool use, and cost","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2026-05-19","last_updated":"2026-05-19","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":1.5,"output":9,"cache_read":0.15,"input_audio":1.5}},"gemini-2.5-pro":{"id":"gemini-2.5-pro","name":"Gemini 2.5 Pro","description":"Google's proven reasoning model for coding, math, and multimodal analysis","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"budget_tokens","min":128,"max":32768}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2025-06-17","last_updated":"2025-06-17","modalities":{"input":["text","image","audio","video","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":1.25,"output":10,"cache_read":0.125,"tiers":[{"input":2.5,"output":15,"cache_read":0.25,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":2.5,"output":15,"cache_read":0.25}},"canonical_model_id":"google/gemini-2.5-pro"},"gemini-3-pro-image":{"id":"gemini-3-pro-image","name":"Nano Banana Pro","description":"Nano Banana Pro for higher-fidelity image generation and design-heavy edits","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","high"]}],"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2026-05-28","last_updated":"2026-05-28","modalities":{"input":["text","image"],"output":["text","image"]},"open_weights":false,"limit":{"context":65536,"output":32768},"cost":{"input":2,"output":120},"canonical_model_id":"google/gemini-3-pro-image"},"gemini-2.5-flash":{"id":"gemini-2.5-flash","name":"Gemini 2.5 Flash","description":"Fast Gemini workhorse for multimodal apps where latency and price matter","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"toggle"},{"type":"budget_tokens","min":0,"max":24576}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2025-06-17","last_updated":"2025-06-17","modalities":{"input":["text","image","audio","video","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.3,"output":2.5,"cache_read":0.03,"input_audio":1},"canonical_model_id":"google/gemini-2.5-flash"},"gemini-2.5-flash-preview-tts":{"id":"gemini-2.5-flash-preview-tts","name":"Gemini 2.5 Flash Preview TTS","description":"Speech generation model for controllable voice, narration, and audio delivery","family":"gemini-flash","attachment":false,"reasoning":false,"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2025-05-01","last_updated":"2025-05-01","modalities":{"input":["text"],"output":["audio"]},"open_weights":false,"limit":{"context":8192,"output":16384},"cost":{"input":0.5,"output":10}},"gemini-3.1-flash-lite-image":{"id":"gemini-3.1-flash-lite-image","name":"Nano Banana 2 Lite","description":"Fastest, most cost-efficient Gemini image model for high-volume 1K generation and editing","family":"gemini-flash-lite","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","high"]}],"tool_call":true,"structured_output":false,"temperature":true,"knowledge":"2025-01","release_date":"2026-06-30","last_updated":"2026-06-30","modalities":{"input":["text","image"],"output":["text","image"]},"open_weights":false,"limit":{"context":65536,"output":4096},"cost":{"input":0.25,"output":30},"canonical_model_id":"google/gemini-3.1-flash-lite-image"},"deep-research-preview-04-2026":{"id":"deep-research-preview-04-2026","name":"Deep Research Preview (Apr-21-2026)","description":"Agentic model for autonomous multi-step research, synthesis, and cited reports","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":true,"temperature":true,"knowledge":"2025-01","release_date":"2026-04-21","last_updated":"2026-04-21","modalities":{"input":["text","image","video","audio","pdf"],"output":["text","image"]},"open_weights":false,"limit":{"context":131072,"output":65536},"cost":{"input":2,"output":12,"cache_read":0.2,"tiers":[{"input":4,"output":18,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":4,"output":18,"cache_read":0.4}},"canonical_model_id":"google/deep-research-preview-04-2026"},"deep-research-max-preview-04-2026":{"id":"deep-research-max-preview-04-2026","name":"Deep Research Max Preview (Apr-21-2026)","description":"Maximum-comprehensiveness agentic researcher for multi-step investigation, synthesis, and cited reports","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":true,"temperature":true,"knowledge":"2025-01","release_date":"2026-04-21","last_updated":"2026-04-21","modalities":{"input":["text","image","video","audio","pdf"],"output":["text","image"]},"open_weights":false,"limit":{"context":131072,"output":65536},"cost":{"input":2,"output":12,"cache_read":0.2,"tiers":[{"input":4,"output":18,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":4,"output":18,"cache_read":0.4}},"canonical_model_id":"google/deep-research-max-preview-04-2026"},"veo-3.1-fast-generate-preview":{"id":"veo-3.1-fast-generate-preview","name":"Veo 3.1 fast","description":"Video model for prompt-guided generation, editing, and motion workflows","family":"veo","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2025-10-15","last_updated":"2026-01-01","modalities":{"input":["text","image","video"],"output":["video"]},"open_weights":false,"limit":{"context":480,"output":8192},"canonical_model_id":"google/veo-3.1-fast-generate-preview"},"gemini-3.7-flash":{"id":"gemini-3.7-flash","name":"Gemini 3.7 Flash","description":"High-efficiency Gemini model for agentic workflows, coding, and multimodal reasoning","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2026-03","release_date":"2026-08-13","last_updated":"2026-08-13","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.75,"output":3.75,"cache_read":0.075,"input_audio":0.75},"canonical_model_id":"google/gemini-3.7-flash"},"veo-3.1-generate-preview":{"id":"veo-3.1-generate-preview","name":"Veo 3.1","description":"Video model for prompt-guided generation, editing, and motion workflows","family":"veo","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2025-10-15","last_updated":"2026-01","modalities":{"input":["text","image"],"output":["video"]},"open_weights":false,"limit":{"context":480,"output":8192},"status":"beta","canonical_model_id":"google/veo-3.1-generate-preview"},"gemini-3.1-pro-preview-customtools":{"id":"gemini-3.1-pro-preview-customtools","name":"Gemini 3.1 Pro Preview Custom Tools","description":"Advanced Gemini model for complex reasoning, coding, and multimodal analysis","family":"gemini-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2026-02-19","last_updated":"2026-02-19","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":2,"output":12,"cache_read":0.2,"tiers":[{"input":4,"output":18,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":4,"output":18,"cache_read":0.4}}},"gemini-3-flash-preview":{"id":"gemini-3-flash-preview","name":"Gemini 3 Flash Preview","description":"New Gemini flash lane bringing frontier-style multimodal reasoning to cheaper runs","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2025-12-17","last_updated":"2025-12-17","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.5,"output":3,"cache_read":0.05,"input_audio":1}},"gemini-3.8-flash":{"id":"gemini-3.8-flash","name":"Gemini 3.8 Flash","description":"Google's most intelligent Flash model, engineered for long-horizon software engineering, autonomous agents, and complex enterprise workflows","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-09-02","last_updated":"2026-09-02","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.75,"output":3.75,"cache_read":0.075,"input_audio":0.75},"canonical_model_id":"google/gemini-3.8-flash"},"gemini-3.5-live-translate-preview":{"id":"gemini-3.5-live-translate-preview","name":"Gemini 3.5 Live Translate Preview","description":"Low-latency audio-to-audio model for real-time speech translation across 70+ languages","family":"gemini-pro","attachment":false,"reasoning":false,"tool_call":false,"temperature":true,"knowledge":"2025-01","release_date":"2026-06-09","last_updated":"2026-06-09","modalities":{"input":["audio"],"output":["audio","text"]},"open_weights":false,"limit":{"context":16384,"output":32768},"cost":{"input":3.5,"output":21,"input_audio":3.5,"output_audio":21},"canonical_model_id":"google/gemini-3.5-live-translate-preview"},"gemini-2.5-flash-lite":{"id":"gemini-2.5-flash-lite","name":"Gemini 2.5 Flash-Lite","description":"Lean Gemini 2.5 lane for cheap multimodal traffic and quick agents","family":"gemini-flash-lite","attachment":true,"reasoning":true,"reasoning_options":[{"type":"toggle"},{"type":"budget_tokens","min":512,"max":24576}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2025-06-17","last_updated":"2025-06-17","modalities":{"input":["text","image","audio","video","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.1,"output":0.4,"cache_read":0.01,"input_audio":0.3}},"gemini-embedding-001":{"id":"gemini-embedding-001","name":"Gemini Embedding 001","description":"Embedding model for semantic search, retrieval, clustering, and ranking pipelines","family":"gemini","attachment":false,"reasoning":false,"tool_call":false,"temperature":false,"knowledge":"2025-05","release_date":"2025-05-20","last_updated":"2025-05-20","modalities":{"input":["text"],"output":["text"]},"open_weights":false,"limit":{"context":2048,"output":1},"cost":{"input":0.15,"output":0}},"gemini-3.1-flash-lite-preview":{"id":"gemini-3.1-flash-lite-preview","name":"Gemini 3.1 Flash Lite Preview","description":"Legacy model retained for compatibility with older integrations","family":"gemini-flash-lite","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2026-03-03","last_updated":"2026-03-03","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"status":"deprecated","cost":{"input":0.25,"output":1.5,"cache_read":0.025,"input_audio":0.5}},"gemini-3.1-flash-live-preview":{"id":"gemini-3.1-flash-live-preview","name":"Gemini 3.1 Flash Live Preview","description":"High-quality, low-latency Live API model for real-time dialogue and voice-first AI applications","family":"gemini-flash","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":false,"temperature":true,"knowledge":"2025-01","release_date":"2026-03-26","last_updated":"2026-03-26","modalities":{"input":["text","image","video","audio"],"output":["text","audio"]},"open_weights":false,"limit":{"context":131072,"output":65536},"cost":{"input":0.75,"output":4.5,"input_audio":3,"output_audio":12},"canonical_model_id":"google/gemini-3.1-flash-live-preview"},"gemini-3.1-flash-lite":{"id":"gemini-3.1-flash-lite","name":"Gemini 3.1 Flash Lite","description":"Low-latency Gemini model for high-volume multimodal and agent workloads","family":"gemini-flash-lite","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-01","release_date":"2026-05-07","last_updated":"2026-05-07","modalities":{"input":["text","image","video","audio","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1048576,"output":65536},"cost":{"input":0.25,"output":1.5,"cache_read":0.025,"input_audio":0.5}}}},"anthropic":{"models":{"claude-haiku-4-5":{"id":"claude-haiku-4-5","name":"Claude Haiku 4.5 (latest)","description":"Fast Claude lane for lightweight agents, office tasks, and responsive chat","family":"claude-haiku","attachment":true,"reasoning":true,"reasoning_options":[{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-02-28","release_date":"2025-10-15","last_updated":"2025-10-15","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":64000},"cost":{"input":1,"output":5,"cache_read":0.1,"cache_write":1.25},"canonical_model_id":"anthropic/claude-haiku-4-5"},"claude-opus-4-5":{"id":"claude-opus-4-5","name":"Claude Opus 4.5 (latest)","description":"Flagship Claude model for deep reasoning, coding, and long-horizon agents","family":"claude-opus","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]},{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-05","release_date":"2025-11-24","last_updated":"2025-11-24","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":64000},"cost":{"input":5,"output":25,"cache_read":0.5,"cache_write":6.25},"canonical_model_id":"anthropic/claude-opus-4-5"},"claude-sonnet-4-5":{"id":"claude-sonnet-4-5","name":"Claude Sonnet 4.5 (latest)","description":"Balanced Claude model for coding, analysis, agent workflows, and cost control","family":"claude-sonnet","attachment":true,"reasoning":true,"reasoning_options":[{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-07-31","release_date":"2025-09-29","last_updated":"2025-09-29","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":64000},"cost":{"input":3,"output":15,"cache_read":0.3,"cache_write":3.75},"canonical_model_id":"anthropic/claude-sonnet-4-5"},"claude-opus-5-5":{"id":"claude-opus-5-5","name":"Claude Opus 5.5","description":"Claude model for long-running agentic coding and knowledge work","family":"claude-opus","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-06","release_date":"2026-09-22","last_updated":"2026-09-22","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":8,"output":40,"cache_read":0.4,"cache_write":10},"provider":{"body":{"speed":"fast"},"headers":{"anthropic-beta":"fast-mode-2026-02-01"}}}}},"cost":{"input":4,"output":20,"cache_read":0.2,"cache_write":5},"canonical_model_id":"anthropic/claude-opus-5-5"},"claude-fable-5-1":{"id":"claude-fable-5-1","name":"Claude Fable 5.1","description":"Claude model for demanding reasoning and long-horizon agentic work","family":"claude-fable","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-06","release_date":"2026-09-01","last_updated":"2026-09-01","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"cost":{"input":10,"output":50,"cache_read":0.25,"cache_write":12.5},"canonical_model_id":"anthropic/claude-fable-5-1"},"claude-opus-4-5-20251101":{"id":"claude-opus-4-5-20251101","name":"Claude Opus 4.5","description":"Flagship Claude model for deep reasoning, coding, and long-horizon agents","family":"claude-opus","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]},{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-05","release_date":"2025-11-24","last_updated":"2025-11-01","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":64000},"cost":{"input":5,"output":25,"cache_read":0.5,"cache_write":6.25}},"claude-opus-5":{"id":"claude-opus-5","name":"Claude Opus 5","description":"Strongest Claude Opus model for coding, agents, and professional work","family":"claude-opus","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-05","release_date":"2026-07-24","last_updated":"2026-07-24","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":10,"output":50,"cache_read":1,"cache_write":12.5},"provider":{"body":{"speed":"fast"},"headers":{"anthropic-beta":"fast-mode-2026-02-01"}}}}},"cost":{"input":5,"output":25,"cache_read":0.5,"cache_write":6.25},"canonical_model_id":"anthropic/claude-opus-5"},"claude-fable-5":{"id":"claude-fable-5","name":"Claude Fable 5","description":"Claude model for creative writing, analysis, and controlled agent workflows","family":"claude-fable","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"release_date":"2026-06-07","last_updated":"2026-06-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"cost":{"input":10,"output":50,"cache_read":1,"cache_write":12.5}},"claude-opus-4-8":{"id":"claude-opus-4-8","name":"Claude Opus 4.8","description":"Top Claude Opus tier for the hardest reasoning, coding, and long-horizon agents","family":"claude-opus","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-01","release_date":"2026-05-28","last_updated":"2026-05-28","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":10,"output":50,"cache_read":1,"cache_write":12.5},"provider":{"body":{"speed":"fast"},"headers":{"anthropic-beta":"fast-mode-2026-02-01"}}}}},"cost":{"input":5,"output":25,"cache_read":0.5,"cache_write":6.25}},"claude-sonnet-4-5-20250929":{"id":"claude-sonnet-4-5-20250929","name":"Claude Sonnet 4.5","description":"Balanced Claude model for coding, analysis, agent workflows, and cost control","family":"claude-sonnet","attachment":true,"reasoning":true,"reasoning_options":[{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-07-31","release_date":"2025-09-29","last_updated":"2025-09-29","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":64000},"cost":{"input":3,"output":15,"cache_read":0.3,"cache_write":3.75}},"claude-sonnet-5":{"id":"claude-sonnet-5","name":"Claude Sonnet 5","description":"Everyday Claude agent model for coding, planning, browsing, and general work","family":"claude-sonnet","attachment":true,"reasoning":true,"reasoning_options":[{"type":"toggle"},{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-01-31","release_date":"2026-06-29","last_updated":"2026-06-30","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"cost":{"input":2,"output":10,"cache_read":0.2,"cache_write":2.5}},"claude-opus-4-6":{"id":"claude-opus-4-6","name":"Claude Opus 4.6","description":"High-end Claude for difficult coding, planning, and slower expert reasoning","family":"claude-opus","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","max"]},{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-05-31","release_date":"2026-02-04","last_updated":"2026-03-13","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"cost":{"input":5,"output":25,"cache_read":0.5,"cache_write":6.25}},"claude-haiku-4-5-20251001":{"id":"claude-haiku-4-5-20251001","name":"Claude Haiku 4.5","description":"Fast Claude model for responsive assistance, classification, and lightweight agents","family":"claude-haiku","attachment":true,"reasoning":true,"reasoning_options":[{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-02-28","release_date":"2025-10-15","last_updated":"2025-10-15","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":64000},"cost":{"input":1,"output":5,"cache_read":0.1,"cache_write":1.25}},"claude-sonnet-4-6":{"id":"claude-sonnet-4-6","name":"Claude Sonnet 4.6","description":"Claude workhorse for coding agents, careful analysis, and production cost control","family":"claude-sonnet","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","max"]},{"type":"budget_tokens","min":1024}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-08-31","release_date":"2026-02-17","last_updated":"2026-03-13","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"cost":{"input":3,"output":15,"cache_read":0.3,"cache_write":3.75}},"claude-sonnet-5-5":{"id":"claude-sonnet-5-5","name":"Claude Sonnet 5.5","description":"Fast Claude model for everyday coding, agents, and knowledge work","family":"claude-sonnet","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-06","release_date":"2026-09-28","last_updated":"2026-09-28","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"cost":{"input":2,"output":10,"cache_read":0.2,"cache_write":2.5},"canonical_model_id":"anthropic/claude-sonnet-5-5"},"claude-opus-4-7":{"id":"claude-opus-4-7","name":"Claude Opus 4.7","description":"Stronger Opus tier for advanced software work and high-stakes reasoning","family":"claude-opus","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-01-31","release_date":"2026-04-14","last_updated":"2026-04-16","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"cost":{"input":5,"output":25,"cache_read":0.5,"cache_write":6.25}}}},"openai":{"models":{"chatgpt-image-latest":{"id":"chatgpt-image-latest","name":"chatgpt-image-latest","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"gpt-image","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2025-12-16","last_updated":"2025-12-16","modalities":{"input":["text","image"],"output":["text","image"]},"open_weights":false,"limit":{"context":0,"input":0,"output":0}},"gpt-5.4":{"id":"gpt-5.4","name":"GPT-5.4","description":"Agent-ready GPT for coding and computer-use workflows at a lower cost","family":"gpt","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-08-31","release_date":"2026-03-05","last_updated":"2026-03-05","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":5,"output":30,"cache_read":0.5},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":2.5,"output":15,"cache_read":0.25,"tiers":[{"input":5,"output":22.5,"cache_read":0.5,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":5,"output":22.5,"cache_read":0.5}}},"gpt-5.4-pro":{"id":"gpt-5.4-pro","name":"GPT-5.4 Pro","description":"More exact GPT-5.4 tier for demanding professional reasoning and agent tasks","family":"gpt-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["medium","high","xhigh"]}],"tool_call":true,"structured_output":false,"temperature":false,"knowledge":"2025-08-31","release_date":"2026-03-05","last_updated":"2026-03-05","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"cost":{"input":30,"output":180,"tiers":[{"input":60,"output":270,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":60,"output":270}}},"gpt-3.5-turbo":{"id":"gpt-3.5-turbo","name":"GPT-3.5-turbo","description":"Compact GPT model for low-latency assistance and high-volume workloads","family":"gpt","attachment":false,"reasoning":false,"tool_call":false,"structured_output":false,"temperature":true,"knowledge":"2021-09-01","release_date":"2023-03-01","last_updated":"2023-11-06","modalities":{"input":["text"],"output":["text"]},"open_weights":false,"limit":{"context":16385,"output":4096},"status":"deprecated","cost":{"input":0.5,"output":1.5,"cache_read":0}},"gpt-5.5-pro":{"id":"gpt-5.5-pro","name":"GPT-5.5 Pro","description":"Highest-accuracy GPT-5.5 tier for slower, precision-heavy reasoning and coding","family":"gpt-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2025-12-01","release_date":"2026-04-23","last_updated":"2026-04-23","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"cost":{"input":30,"output":180,"tiers":[{"input":60,"output":270,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":60,"output":270}}},"text-embedding-3-small":{"id":"text-embedding-3-small","name":"text-embedding-3-small","description":"Embedding model for semantic search, retrieval, clustering, and ranking pipelines","family":"text-embedding","attachment":false,"reasoning":false,"tool_call":false,"temperature":false,"knowledge":"2024-01","release_date":"2024-01-25","last_updated":"2024-01-25","modalities":{"input":["text"],"output":["text"]},"open_weights":false,"limit":{"context":8191,"output":1536},"cost":{"input":0.02,"output":0}},"gpt-5.4-nano":{"id":"gpt-5.4-nano","name":"GPT-5.4 nano","description":"Cheapest GPT-5.4 lane for simple routing, extraction, and bulk automation","family":"gpt-nano","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-08-31","release_date":"2026-03-17","last_updated":"2026-03-17","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"flex":{"cost":{"input":0.1,"output":0.625,"cache_read":0.01},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":0.2,"output":1.25,"cache_read":0.02}},"gpt-realtime-2.1":{"id":"gpt-realtime-2.1","name":"GPT-Realtime-2.1","description":"Realtime speech-to-speech model with configurable reasoning, tool use, and robust voice-agent behavior","family":"gpt","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":false,"temperature":false,"knowledge":"2024-09-30","release_date":"2026-07-06","last_updated":"2026-07-06","modalities":{"input":["text","audio","image"],"output":["text","audio"]},"open_weights":false,"limit":{"context":128000,"input":96000,"output":32000},"cost":{"input":4,"output":24,"cache_read":0.4,"input_audio":32,"output_audio":64},"canonical_model_id":"openai/gpt-realtime-2.1"},"gpt-4o-2024-05-13":{"id":"gpt-4o-2024-05-13","name":"GPT-4o (2024-05-13)","description":"GPT model for general reasoning, writing, coding, and tool-assisted tasks","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2023-09","release_date":"2024-05-13","last_updated":"2024-05-13","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":4096},"status":"deprecated","experimental":{"modes":{"fast":{"cost":{"input":8.75,"output":26.25},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":5,"output":15}},"gpt-4o":{"id":"gpt-4o","name":"GPT-4o","description":"Omni-era GPT for multimodal chat, practical coding, and general assistants","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2023-09","release_date":"2024-05-13","last_updated":"2024-08-06","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":16384},"experimental":{"modes":{"fast":{"cost":{"input":4.25,"output":17,"cache_read":2.125},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":2.5,"output":10,"cache_read":1.25}},"gpt-5-mini":{"id":"gpt-5-mini","name":"GPT-5 Mini","description":"Small GPT-5 for responsive agents, coding help, and everyday automation","family":"gpt-mini","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-05-30","release_date":"2025-08-07","last_updated":"2025-08-07","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":0.45,"output":3.6,"cache_read":0.045},"provider":{"body":{"service_tier":"priority"}}},"flex":{"cost":{"input":0.125,"output":1,"cache_read":0.0125},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":0.25,"output":2,"cache_read":0.025}},"gpt-image-2":{"id":"gpt-image-2","name":"gpt-image-2","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"gpt-image","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2026-04-21","last_updated":"2026-04-21","modalities":{"input":["text","image"],"output":["image"]},"open_weights":false,"limit":{"context":0,"input":0,"output":0},"cost":{"input":5,"output":30,"cache_read":1.25},"canonical_model_id":"openai/gpt-image-2"},"gpt-5.2-pro":{"id":"gpt-5.2-pro","name":"GPT-5.2 Pro","description":"Higher-accuracy GPT-5.2 variant for tougher reasoning and review workflows","family":"gpt-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["medium","high","xhigh"]}],"tool_call":true,"structured_output":false,"temperature":false,"knowledge":"2025-08-31","release_date":"2025-12-11","last_updated":"2025-12-11","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"cost":{"input":21,"output":168}},"o4-mini":{"id":"o4-mini","name":"o4-mini","description":"Fast o-series model for compact reasoning, coding, and tool use","family":"o-mini","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-05","release_date":"2025-04-16","last_updated":"2025-04-16","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":100000},"status":"deprecated","experimental":{"modes":{"fast":{"cost":{"input":2,"output":8,"cache_read":0.5},"provider":{"body":{"service_tier":"priority"}}},"flex":{"cost":{"input":0.55,"output":2.2,"cache_read":0.138},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":1.1,"output":4.4,"cache_read":0.275}},"o3-mini":{"id":"o3-mini","name":"o3-mini","description":"Smaller o-series reasoner for economical coding, math, and planning tasks","family":"o-mini","attachment":false,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-05","release_date":"2024-12-20","last_updated":"2025-01-29","modalities":{"input":["text"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":100000},"status":"deprecated","cost":{"input":1.1,"output":4.4,"cache_read":0.55}},"text-embedding-ada-002":{"id":"text-embedding-ada-002","name":"text-embedding-ada-002","description":"Embedding model for semantic search, retrieval, clustering, and ranking pipelines","family":"text-embedding","attachment":false,"reasoning":false,"tool_call":false,"temperature":false,"knowledge":"2022-12","release_date":"2022-12-15","last_updated":"2022-12-15","modalities":{"input":["text"],"output":["text"]},"open_weights":false,"limit":{"context":8192,"output":1536},"cost":{"input":0.1,"output":0}},"gpt-4":{"id":"gpt-4","name":"GPT-4","description":"GPT model for general reasoning, writing, coding, and tool-assisted tasks","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":false,"temperature":true,"knowledge":"2023-11","release_date":"2023-11-06","last_updated":"2024-04-09","modalities":{"input":["text"],"output":["text"]},"open_weights":false,"limit":{"context":8192,"output":8192},"status":"deprecated","cost":{"input":30,"output":60}},"gpt-5.3-codex":{"id":"gpt-5.3-codex","name":"GPT-5.3 Codex","description":"Coding-optimized GPT model for repository edits, reviews, and agentic software work","family":"gpt-codex","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-08-31","release_date":"2026-02-05","last_updated":"2026-02-05","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":3.5,"output":28,"cache_read":0.35},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":1.75,"output":14,"cache_read":0.175}},"gpt-4.1-nano":{"id":"gpt-4.1-nano","name":"GPT-4.1 nano","description":"Tiny GPT-4.1 option for classification, routing, and very high-volume tasks","family":"gpt-nano","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2024-04","release_date":"2025-04-14","last_updated":"2025-04-14","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":1047576,"output":32768},"status":"deprecated","experimental":{"modes":{"fast":{"cost":{"input":0.2,"output":0.8,"cache_read":0.05},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":0.1,"output":0.4,"cache_read":0.025}},"gpt-5-nano":{"id":"gpt-5-nano","name":"GPT-5 Nano","description":"Tiny GPT-5 lane for routing, extraction, classification, and bulk jobs","family":"gpt-nano","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-05-30","release_date":"2025-08-07","last_updated":"2025-08-07","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"flex":{"cost":{"input":0.025,"output":0.2,"cache_read":0.0025},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":0.05,"output":0.4,"cache_read":0.005}},"gpt-5.6":{"id":"gpt-5.6","name":"GPT-5.6","description":"Frontier GPT-5.6 model for complex professional work, coding, and agentic workflows","family":"gpt-sol","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-02-16","release_date":"2026-07-09","last_updated":"2026-07-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":8,"output":40,"cache_read":0.8,"cache_write":10},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}}}},"cost":{"input":4,"output":20,"cache_read":0.4,"cache_write":5,"tiers":[{"input":8,"output":30,"cache_read":0.8,"cache_write":10,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":8,"output":30,"cache_read":0.8,"cache_write":10}},"canonical_model_id":"openai/gpt-5.6-sol"},"gpt-5.2-chat-latest":{"id":"gpt-5.2-chat-latest","name":"GPT-5.2 Chat","description":"Chat-tuned GPT model for conversational assistance, writing, and tool workflows","family":"gpt-codex","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["medium"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2025-08-31","release_date":"2025-12-11","last_updated":"2025-12-11","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":16384},"status":"deprecated","cost":{"input":1.75,"output":14,"cache_read":0.175}},"o1":{"id":"o1","name":"o1","description":"O-series reasoning model for hard analysis, math, coding, and planning","family":"o","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2023-09","release_date":"2024-12-05","last_updated":"2024-12-05","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":100000},"status":"deprecated","cost":{"input":15,"output":60,"cache_read":7.5}},"gpt-5-pro":{"id":"gpt-5-pro","name":"GPT-5 Pro","description":"Higher-accuracy GPT-5 tier for tough analysis, coding reviews, and planning","family":"gpt-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-09-30","release_date":"2025-10-06","last_updated":"2025-10-06","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":272000},"cost":{"input":15,"output":120}},"gpt-5.3-codex-spark":{"id":"gpt-5.3-codex-spark","name":"GPT-5.3 Codex Spark","description":"Coding-optimized GPT model for repository edits, reviews, and agentic software work","family":"gpt-codex-spark","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2025-08-31","release_date":"2026-02-05","last_updated":"2026-02-05","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"input":100000,"output":32000},"cost":{"input":1.75,"output":14,"cache_read":0.175}},"gpt-6.1-sol":{"id":"gpt-6.1-sol","name":"GPT-6.1 Sol","description":"Near-Astra performance for complex coding, computer use, and professional work at a lower cost.","family":"gpt-sol","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-04-30","release_date":"2026-09-29","last_updated":"2026-09-29","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":4,"output":20,"cache_read":0.2,"cache_write":5},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}}}},"cost":{"input":2,"output":10,"cache_read":0.1,"cache_write":2.5,"tiers":[{"input":4,"output":15,"cache_read":0.2,"cache_write":5,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":4,"output":15,"cache_read":0.2,"cache_write":5}},"canonical_model_id":"openai/gpt-6.1-sol"},"text-embedding-3-large":{"id":"text-embedding-3-large","name":"text-embedding-3-large","description":"Embedding model for semantic search, retrieval, clustering, and ranking pipelines","family":"text-embedding","attachment":false,"reasoning":false,"tool_call":false,"temperature":false,"knowledge":"2024-01","release_date":"2024-01-25","last_updated":"2024-01-25","modalities":{"input":["text"],"output":["text"]},"open_weights":false,"limit":{"context":8191,"output":3072},"cost":{"input":0.13,"output":0}},"gpt-4o-2024-08-06":{"id":"gpt-4o-2024-08-06","name":"GPT-4o (2024-08-06)","description":"GPT model for general reasoning, writing, coding, and tool-assisted tasks","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2023-09","release_date":"2024-08-06","last_updated":"2024-08-06","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":16384},"cost":{"input":2.5,"output":10,"cache_read":1.25}},"gpt-6-astra":{"id":"gpt-6-astra","name":"GPT-6 Astra","description":"GPT-6 Astra is OpenAI's most capable model for complex reasoning, coding, computer use, research, and document creation.","family":"gpt-astra","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-04-30","release_date":"2026-09-04","last_updated":"2026-09-04","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":20,"output":100,"cache_read":2,"cache_write":25},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}},"ultrafast":{"cost":{"input":60,"output":300,"cache_read":6,"cache_write":75},"provider":{"body":{"service_tier":"ultrafast"}}}}},"cost":{"input":10,"output":50,"cache_read":1,"cache_write":12.5,"tiers":[{"input":20,"output":75,"cache_read":2,"cache_write":25,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":20,"output":75,"cache_read":2,"cache_write":25}},"canonical_model_id":"openai/gpt-6-astra"},"gpt-5.1":{"id":"gpt-5.1","name":"GPT-5.1","description":"Sharper GPT-5 generation for coding, product work, and tool-assisted tasks","family":"gpt","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2024-09-30","release_date":"2025-11-13","last_updated":"2025-11-13","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":2.5,"output":20,"cache_read":0.25},"provider":{"body":{"service_tier":"priority"}}},"flex":{"cost":{"input":0.625,"output":5,"cache_read":0.0625},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":1.25,"output":10,"cache_read":0.125}},"gpt-4o-mini":{"id":"gpt-4o-mini","name":"GPT-4o mini","description":"Small omni GPT for cheap multimodal assistance and production-scale traffic","family":"gpt-mini","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2023-09","release_date":"2024-07-18","last_updated":"2024-07-18","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":16384},"experimental":{"modes":{"fast":{"cost":{"input":0.25,"output":1,"cache_read":0.125},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":0.15,"output":0.6,"cache_read":0.075}},"o3-pro":{"id":"o3-pro","name":"o3-pro","description":"High-effort o3 tier for difficult technical reasoning and careful answers","family":"o-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-05","release_date":"2025-06-10","last_updated":"2025-06-10","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":100000},"cost":{"input":20,"output":80}},"gpt-image-1":{"id":"gpt-image-1","name":"gpt-image-1","description":"OpenAI image model for production generation, edits, and brand-safe visual workflows","family":"gpt-image","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2025-04-24","last_updated":"2025-04-24","modalities":{"input":["text","image"],"output":["image"]},"open_weights":false,"limit":{"context":0,"input":0,"output":0},"status":"deprecated","canonical_model_id":"openai/gpt-image-1"},"gpt-daybreak-blue-latest":{"id":"gpt-daybreak-blue-latest","name":"Daybreak Blue","description":"Alias for flagship general-purpose models with safeguards for defensive cybersecurity work","family":"gpt-sol","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-02-16","release_date":"2026-08-07","last_updated":"2026-08-07","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"cost":{"input":4,"output":20,"cache_read":0.4,"cache_write":5,"tiers":[{"input":8,"output":30,"cache_read":0.8,"cache_write":10,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":8,"output":30,"cache_read":0.8,"cache_write":10}},"canonical_model_id":"openai/gpt-5.6-sol"},"gpt-5.4-mini":{"id":"gpt-5.4-mini","name":"GPT-5.4 mini","description":"Strong small GPT for coding subagents, quick tool use, and high-volume work","family":"gpt-mini","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-08-31","release_date":"2026-03-17","last_updated":"2026-03-17","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":1.5,"output":9,"cache_read":0.15},"provider":{"body":{"service_tier":"priority"}}},"flex":{"cost":{"input":0.375,"output":2.25,"cache_read":0.0375},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":0.75,"output":4.5,"cache_read":0.075}},"gpt-5.6-luna":{"id":"gpt-5.6-luna","name":"GPT-5.6 Luna","description":"Cost-efficient GPT-5.6 model for fast, high-volume workloads","family":"gpt-luna","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-02-16","release_date":"2026-07-09","last_updated":"2026-07-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":0.4,"output":2.4,"cache_read":0.04,"cache_write":0.5},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}}}},"cost":{"input":0.2,"output":1.2,"cache_read":0.02,"cache_write":0.25,"tiers":[{"input":0.4,"output":1.8,"cache_read":0.04,"cache_write":0.5,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":0.4,"output":1.8,"cache_read":0.04,"cache_write":0.5}},"canonical_model_id":"openai/gpt-5.6-luna"},"gpt-5.2":{"id":"gpt-5.2","name":"GPT-5.2","description":"Reliable GPT generation for broad coding, writing, and tool-assisted product work","family":"gpt","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-08-31","release_date":"2025-12-11","last_updated":"2025-12-11","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":3.5,"output":28,"cache_read":0.35},"provider":{"body":{"service_tier":"priority"}}},"flex":{"cost":{"input":0.875,"output":7,"cache_read":0.0875},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":1.75,"output":14,"cache_read":0.175}},"gpt-5.5":{"id":"gpt-5.5","name":"GPT-5.5","description":"Default frontier GPT for coding, computer use, research, and knowledge work","family":"gpt","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2025-12-01","release_date":"2026-04-23","last_updated":"2026-04-23","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":12.5,"output":75,"cache_read":1.25},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":5,"output":30,"cache_read":0.5,"tiers":[{"input":10,"output":45,"cache_read":1,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":10,"output":45,"cache_read":1}}},"gpt-4.1":{"id":"gpt-4.1","name":"GPT-4.1","description":"Long-lived GPT workhorse for coding, instruction following, and production apps","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2024-04","release_date":"2025-04-14","last_updated":"2025-04-14","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1047576,"output":32768},"experimental":{"modes":{"fast":{"cost":{"input":3.5,"output":14,"cache_read":0.875},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":2,"output":8,"cache_read":0.5}},"gpt-4o-2024-11-20":{"id":"gpt-4o-2024-11-20","name":"GPT-4o (2024-11-20)","description":"GPT model for general reasoning, writing, coding, and tool-assisted tasks","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2023-09","release_date":"2024-11-20","last_updated":"2024-11-20","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":16384},"cost":{"input":2.5,"output":10,"cache_read":1.25}},"gpt-4.1-mini":{"id":"gpt-4.1-mini","name":"GPT-4.1 mini","description":"Affordable GPT-4.1 lane for fast coding help and structured extraction","family":"gpt-mini","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2024-04","release_date":"2025-04-14","last_updated":"2025-04-14","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1047576,"output":32768},"experimental":{"modes":{"fast":{"cost":{"input":0.7,"output":2.8,"cache_read":0.175},"provider":{"body":{"service_tier":"priority"}}}}},"cost":{"input":0.4,"output":1.6,"cache_read":0.1}},"gpt-6-luna":{"id":"gpt-6-luna","name":"GPT-6 Luna","description":"OpenAI's most efficient model for focused, high-volume tasks","family":"gpt-luna","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-05-18","release_date":"2026-09-22","last_updated":"2026-09-22","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":0.2,"output":1,"cache_read":0.02,"cache_write":0.25},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}}}},"cost":{"input":0.1,"output":0.5,"cache_read":0.01,"cache_write":0.125,"tiers":[{"input":0.2,"output":0.75,"cache_read":0.02,"cache_write":0.25,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":0.2,"output":0.75,"cache_read":0.02,"cache_write":0.25}},"canonical_model_id":"openai/gpt-6-luna"},"gpt-5.3-chat-latest":{"id":"gpt-5.3-chat-latest","name":"GPT-5.3 Chat (latest)","description":"Chat-tuned GPT model for conversational assistance, writing, and tool workflows","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2025-08-31","release_date":"2026-03-03","last_updated":"2026-03-03","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":16384},"status":"deprecated","cost":{"input":1.75,"output":14,"cache_read":0.175}},"gpt-image-1-mini":{"id":"gpt-image-1-mini","name":"gpt-image-1-mini","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"gpt-image","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2025-09-26","last_updated":"2025-09-26","modalities":{"input":["text","image"],"output":["text","image"]},"open_weights":false,"limit":{"context":0,"input":0,"output":0}},"gpt-image-1.5":{"id":"gpt-image-1.5","name":"gpt-image-1.5","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"gpt-image","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2025-11-25","last_updated":"2025-11-25","modalities":{"input":["text","image"],"output":["text","image"]},"open_weights":false,"limit":{"context":0,"input":0,"output":0},"canonical_model_id":"openai/gpt-image-1.5"},"gpt-5.6-terra":{"id":"gpt-5.6-terra","name":"GPT-5.6 Terra","description":"Balanced GPT-5.6 model for capable, cost-efficient everyday work","family":"gpt-terra","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-02-16","release_date":"2026-07-09","last_updated":"2026-07-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":4,"output":24,"cache_read":0.4,"cache_write":5},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}}}},"cost":{"input":2,"output":12,"cache_read":0.2,"cache_write":2.5,"tiers":[{"input":4,"output":18,"cache_read":0.4,"cache_write":5,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":4,"output":18,"cache_read":0.4,"cache_write":5}},"canonical_model_id":"openai/gpt-5.6-terra"},"gpt-4-turbo":{"id":"gpt-4-turbo","name":"GPT-4 Turbo","description":"Compact GPT model for low-latency assistance and high-volume workloads","family":"gpt","attachment":true,"reasoning":false,"tool_call":true,"structured_output":false,"temperature":true,"knowledge":"2023-12","release_date":"2023-11-06","last_updated":"2024-04-09","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":128000,"output":4096},"status":"deprecated","cost":{"input":10,"output":30}},"gpt-daybreak-red-latest":{"id":"gpt-daybreak-red-latest","name":"Daybreak Red","description":"Alias for advanced cybersecurity models for authorized vulnerability research and security testing","family":"gpt","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-02-16","release_date":"2026-08-07","last_updated":"2026-08-07","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"cost":{"input":12.5,"output":75,"cache_read":1.25,"cache_write":15.625},"canonical_model_id":"openai/gpt-5.6-cyber"},"o3":{"id":"o3","name":"o3","description":"Deliberate o-series reasoner for hard math, coding, and multi-step analysis","family":"o","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-05","release_date":"2025-04-16","last_updated":"2025-04-16","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":100000},"experimental":{"modes":{"fast":{"cost":{"input":3.5,"output":14,"cache_read":0.875},"provider":{"body":{"service_tier":"priority"}}},"flex":{"cost":{"input":1,"output":4,"cache_read":0.25},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":2,"output":8,"cache_read":0.5}},"gpt-5":{"id":"gpt-5","name":"GPT-5","description":"Original GPT-5 workhorse for reasoning, coding, writing, and tool workflows","family":"gpt","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["minimal","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2024-09-30","release_date":"2025-08-07","last_updated":"2025-08-07","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":400000,"input":272000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":2.5,"output":20,"cache_read":0.25},"provider":{"body":{"service_tier":"priority"}}},"flex":{"cost":{"input":0.625,"output":5,"cache_read":0.0625},"provider":{"body":{"service_tier":"flex"}}}}},"cost":{"input":1.25,"output":10,"cache_read":0.125},"canonical_model_id":"openai/gpt-5"},"gpt-5.6-sol":{"id":"gpt-5.6-sol","name":"GPT-5.6 Sol","description":"Frontier GPT-5.6 model for complex professional work, coding, and agentic workflows","family":"gpt-sol","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-02-16","release_date":"2026-07-09","last_updated":"2026-07-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":8,"output":40,"cache_read":0.8,"cache_write":10},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}}}},"cost":{"input":4,"output":20,"cache_read":0.4,"cache_write":5,"tiers":[{"input":8,"output":30,"cache_read":0.8,"cache_write":10,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":8,"output":30,"cache_read":0.8,"cache_write":10}},"canonical_model_id":"openai/gpt-5.6-sol"},"gpt-6-sol":{"id":"gpt-6-sol","name":"GPT-6 Sol","description":"OpenAI model for complex coding and agentic workflows","family":"gpt-sol","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-04-20","release_date":"2026-09-22","last_updated":"2026-09-22","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1050000,"input":922000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":4,"output":20,"cache_read":0.4,"cache_write":5},"provider":{"body":{"service_tier":"priority"}}},"pro":{"provider":{"body":{"reasoning":{"mode":"pro"}}}}}},"cost":{"input":2,"output":10,"cache_read":0.2,"cache_write":2.5,"tiers":[{"input":4,"output":15,"cache_read":0.4,"cache_write":5,"tier":{"type":"context","size":272000}}],"context_over_200k":{"input":4,"output":15,"cache_read":0.4,"cache_write":5}},"canonical_model_id":"openai/gpt-6-sol"},"o1-pro":{"id":"o1-pro","name":"o1-pro","description":"O-series reasoning model for hard analysis, math, coding, and planning","family":"o-pro","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2023-09","release_date":"2025-03-19","last_updated":"2025-03-19","modalities":{"input":["text","image"],"output":["text"]},"open_weights":false,"limit":{"context":200000,"output":100000},"status":"deprecated","cost":{"input":150,"output":600}}}},"xai":{"models":{"grok-4.7":{"id":"grok-4.7","name":"Grok 4.7","description":"xAI's frontier model for long-running agents, coding, knowledge work, and visual projects","family":"grok","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2026-05","release_date":"2026-09-21","last_updated":"2026-09-21","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":500000,"output":500000},"cost":{"input":2,"output":6,"cache_read":0.5,"tiers":[{"input":4,"output":12,"cache_read":1,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":4,"output":12,"cache_read":1}},"canonical_model_id":"xai/grok-4.7"},"grok-imagine-video-1.5-lite":{"id":"grok-imagine-video-1.5-lite","name":"Grok Imagine Video 1.5 Lite","description":"Cost-efficient video model for text-to-video and image-to-video generation","family":"grok","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2026-10-01","last_updated":"2026-10-01","modalities":{"input":["text","image","pdf"],"output":["video"]},"open_weights":false,"limit":{"context":1024,"output":0},"canonical_model_id":"xai/grok-imagine-video-1.5-lite"},"grok-imagine-image":{"id":"grok-imagine-image","name":"Grok Imagine Image","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"grok","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2026-01-28","last_updated":"2026-01-28","modalities":{"input":["text","image","pdf"],"output":["image","pdf"]},"open_weights":false,"limit":{"context":16000,"output":0}},"grok-imagine-video":{"id":"grok-imagine-video","name":"Grok Imagine Video","description":"Image model for prompt-driven generation, editing, and visual design workflows","family":"grok","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2026-01-28","last_updated":"2026-01-28","modalities":{"input":["text","image","video","pdf"],"output":["video"]},"open_weights":false,"limit":{"context":1024,"output":0}},"grok-4.3":{"id":"grok-4.3","name":"Grok 4.3","description":"xAI's Grok for chat, coding, agentic tools, and lower hallucination risk","family":"grok","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["none","low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-04-17","last_updated":"2026-04-17","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":30000},"cost":{"input":1.25,"output":2.5,"cache_read":0.2,"tiers":[{"input":2.5,"output":5,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":2.5,"output":5,"cache_read":0.4}}},"grok-4.20-0309-reasoning":{"id":"grok-4.20-0309-reasoning","name":"Grok 4.20 (Reasoning)","description":"Reasoning Grok for document-heavy analysis and long-horizon tool use","family":"grok","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-03-09","last_updated":"2026-03-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":30000},"cost":{"input":1.25,"output":2.5,"cache_read":0.2,"tiers":[{"input":2.5,"output":5,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":2.5,"output":5,"cache_read":0.4}}},"grok-imagine-video-1.5":{"id":"grok-imagine-video-1.5","name":"Grok Imagine Video 1.5","description":"Video model for image-to-video generation, editing, and extension workflows","family":"grok","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2026-05-30","last_updated":"2026-05-30","modalities":{"input":["text","image","audio","pdf"],"output":["video"]},"open_weights":false,"limit":{"context":1024,"output":0},"canonical_model_id":"xai/grok-imagine-video-1.5"},"grok-4.5":{"id":"grok-4.5","name":"Grok 4.5","description":"xAI's Grok model for chat, coding, agentic tools, and lower hallucination risk","family":"grok","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high"]}],"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-07-08","last_updated":"2026-07-08","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":500000,"output":500000},"cost":{"input":2,"output":6,"cache_read":0.3,"tiers":[{"input":4,"output":12,"cache_read":0.6,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":4,"output":12,"cache_read":0.6}},"canonical_model_id":"xai/grok-4.5"},"grok-4.20-0309-non-reasoning":{"id":"grok-4.20-0309-non-reasoning","name":"Grok 4.20 (Non-Reasoning)","description":"Grok model for agentic tool use, reasoning, coding, and live assistance","family":"grok","attachment":true,"reasoning":false,"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-03-09","last_updated":"2026-03-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":30000},"cost":{"input":1.25,"output":2.5,"cache_read":0.2,"tiers":[{"input":2.5,"output":5,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":2.5,"output":5,"cache_read":0.4}}},"grok-imagine-image-quality":{"id":"grok-imagine-image-quality","name":"Grok Imagine Image Quality","description":"Higher-fidelity Grok Imagine image model for prompt-driven generation, editing, and visual design workflows","family":"grok","attachment":true,"reasoning":false,"tool_call":false,"temperature":false,"release_date":"2026-04-03","last_updated":"2026-04-03","modalities":{"input":["text","image","pdf"],"output":["image","pdf"]},"open_weights":false,"limit":{"context":16000,"output":0},"canonical_model_id":"xai/grok-imagine-image-quality"},"grok-build-0.1":{"id":"grok-build-0.1","name":"Grok Build 0.1","description":"Fast Grok coding model tuned for agentic engineering and iterative edits","family":"grok-build","attachment":true,"reasoning":true,"reasoning_options":[],"tool_call":true,"structured_output":true,"temperature":true,"release_date":"2026-04-16","last_updated":"2026-04-16","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":256000,"output":256000},"cost":{"input":1,"output":2,"cache_read":0.2,"tiers":[{"input":2,"output":4,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":2,"output":4,"cache_read":0.4}}},"grok-4.20-multi-agent-0309":{"id":"grok-4.20-multi-agent-0309","name":"Grok 4.20 Multi-Agent","description":"Grok model for agentic tool use, reasoning, coding, and live assistance","family":"grok","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh"]}],"tool_call":false,"structured_output":true,"temperature":true,"release_date":"2026-03-09","last_updated":"2026-03-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":30000},"cost":{"input":1.25,"output":2.5,"cache_read":0.2,"tiers":[{"input":2.5,"output":5,"cache_read":0.4,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":2.5,"output":5,"cache_read":0.4}}},"grok-4.6":{"id":"grok-4.6","name":"Grok 4.6","description":"xAI's frontier model for long-running agents, coding, knowledge work, and visual projects","family":"grok","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh"]}],"tool_call":true,"structured_output":true,"temperature":true,"knowledge":"2026-02-01","release_date":"2026-08-12","last_updated":"2026-08-12","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":500000,"output":500000},"cost":{"input":2,"output":6,"cache_read":0.5,"tiers":[{"input":4,"output":12,"cache_read":1,"tier":{"type":"context","size":200000}}],"context_over_200k":{"input":4,"output":12,"cache_read":1}},"canonical_model_id":"xai/grok-4.6"}}}}
|
package/src/controller.js
CHANGED
|
@@ -476,7 +476,9 @@ export function createController({ boot, run = runTurn, peerDirectory } = {}) {
|
|
|
476
476
|
},
|
|
477
477
|
}
|
|
478
478
|
|
|
479
|
-
onSessionWriteError((err) =>
|
|
479
|
+
const unsubscribeWriteError = onSessionWriteError((err, file) => {
|
|
480
|
+
if (state.session?.file === file) flash(`session not saved: ${errorText(err, 80)}`)
|
|
481
|
+
})
|
|
480
482
|
boot.setMcpNotify(() => emit('mcp', boot.mcp.list()))
|
|
481
483
|
boot.setShellsNotify(() => emit('shells'))
|
|
482
484
|
boot.setWakeupsNotify(() => emit('shells'))
|
|
@@ -566,6 +568,7 @@ export function createController({ boot, run = runTurn, peerDirectory } = {}) {
|
|
|
566
568
|
}
|
|
567
569
|
|
|
568
570
|
async function executeTurn(text, { views = [] } = {}) {
|
|
571
|
+
if (shuttingDown) return
|
|
569
572
|
preparingTurn = true
|
|
570
573
|
let prepared
|
|
571
574
|
preparation = new Promise(resolve => { prepared = resolve })
|
|
@@ -975,13 +978,14 @@ export function createController({ boot, run = runTurn, peerDirectory } = {}) {
|
|
|
975
978
|
state.speed = speed ?? defaultSpeed(state.model)
|
|
976
979
|
}
|
|
977
980
|
|
|
978
|
-
async function newSession() {
|
|
981
|
+
async function newSession(name = '') {
|
|
979
982
|
if (state.busy) return flash('finish or interrupt the current turn first')
|
|
980
983
|
await disconnectPeers()
|
|
981
984
|
resetConversation()
|
|
982
985
|
agents.clear()
|
|
983
986
|
reDerive()
|
|
984
987
|
emit('session', state.session)
|
|
988
|
+
if (typeof name === 'string' && name.trim()) return rename(name)
|
|
985
989
|
flash('new session')
|
|
986
990
|
}
|
|
987
991
|
|
|
@@ -1709,16 +1713,34 @@ export function createController({ boot, run = runTurn, peerDirectory } = {}) {
|
|
|
1709
1713
|
|
|
1710
1714
|
async function shutdown() {
|
|
1711
1715
|
shuttingDown = true
|
|
1716
|
+
unsubscribeWriteError()
|
|
1717
|
+
cancelQuestion()
|
|
1712
1718
|
abort?.abort()
|
|
1719
|
+
agents.cancelAll()
|
|
1720
|
+
boot.wakeups?.cancelAll?.()
|
|
1721
|
+
boot.shells.killAll()
|
|
1722
|
+
await preparation
|
|
1723
|
+
if (state.busy) {
|
|
1724
|
+
await new Promise(resolve => {
|
|
1725
|
+
const unsubscribe = on('change', () => {
|
|
1726
|
+
if (state.busy) return
|
|
1727
|
+
unsubscribe()
|
|
1728
|
+
resolve()
|
|
1729
|
+
})
|
|
1730
|
+
abort?.abort()
|
|
1731
|
+
})
|
|
1732
|
+
}
|
|
1733
|
+
await agents.collect(agents.list().filter(agent => ['queued', 'running'].includes(agent.status)).map(agent => agent.id))
|
|
1713
1734
|
await disconnectPeers()
|
|
1714
1735
|
await state.session?.flush()
|
|
1715
|
-
boot.
|
|
1716
|
-
boot.
|
|
1736
|
+
await boot.mcp.terminateAll()
|
|
1737
|
+
boot.git?.dispose?.()
|
|
1717
1738
|
}
|
|
1718
1739
|
|
|
1719
1740
|
return {
|
|
1720
1741
|
state,
|
|
1721
1742
|
boot,
|
|
1743
|
+
isWorking: () => state.busy || preparingTurn,
|
|
1722
1744
|
on,
|
|
1723
1745
|
agents,
|
|
1724
1746
|
send,
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto'
|
|
2
|
+
import { plain } from './daemon-wire.js'
|
|
3
|
+
import { forkSession, loadSession } from './session.js'
|
|
4
|
+
|
|
5
|
+
const events = ['change', 'derived', 'flash', 'input', 'question', 'turn', 'session', 'resumed', 'mcp', 'shells', 'git', 'project', 'image']
|
|
6
|
+
const queries = ['activity', 'shellRows', 'costSummary', 'speedApplies', 'effortApplies']
|
|
7
|
+
const busy = ctl => ctl.isWorking?.() || ctl.state.busy || ctl.state.compacting || ctl.agents?.list().some(a => ['running', 'queued'].includes(a.status))
|
|
8
|
+
const named = ctl => !!ctl.state.derived?.title?.trim()
|
|
9
|
+
|
|
10
|
+
export function snapshot(ctl) {
|
|
11
|
+
const boot = ctl.boot
|
|
12
|
+
const services = {}
|
|
13
|
+
for (const [service, methods] of Object.entries({ shells: ['list', 'running'], wakeups: ['list', 'pending'], git: ['status'], mcp: ['list'], commands: ['list'], skills: ['list'] })) {
|
|
14
|
+
services[service] = {}
|
|
15
|
+
for (const method of methods) if (typeof boot[service]?.[method] === 'function') services[service][method] = plain(boot[service][method]())
|
|
16
|
+
}
|
|
17
|
+
services.shells ||= {}
|
|
18
|
+
services.shells.outputs = {}
|
|
19
|
+
for (const shell of services.shells.list || []) {
|
|
20
|
+
try { services.shells.outputs[shell.id] = plain(boot.shells.output(shell.id, { tail: 2000 })) } catch {}
|
|
21
|
+
}
|
|
22
|
+
const cached = {}
|
|
23
|
+
for (const method of queries) if (typeof ctl[method] === 'function') cached[method] = plain(ctl[method]())
|
|
24
|
+
return { state: plain(ctl.state), boot: plain(Object.fromEntries(Object.entries(boot).filter(([key]) => !['refs', 'shells', 'wakeups', 'git', 'mcp', 'memory', 'commands', 'skills', 'tracker'].includes(key)))), services, cached, agents: plain(ctl.agents?.list() || []), methods: Object.keys(ctl).filter(k => typeof ctl[k] === 'function' && !['on', 'shutdown'].includes(k)) }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function createDaemonRuntime({ createSession, onEmpty = () => {}, batchMs = 16 }) {
|
|
28
|
+
const sessions = new Map()
|
|
29
|
+
const clients = new Set()
|
|
30
|
+
let queue = Promise.resolve()
|
|
31
|
+
let closed = false
|
|
32
|
+
const serial = task => {
|
|
33
|
+
const result = queue.then(task)
|
|
34
|
+
queue = result.catch(() => {})
|
|
35
|
+
return result
|
|
36
|
+
}
|
|
37
|
+
async function createRecord(client, options) {
|
|
38
|
+
const created = await createSession(options)
|
|
39
|
+
const ctl = created.controller || created
|
|
40
|
+
const record = { id: randomUUID(), ctl, dispose: created.dispose, views: new Set([client]), events: [], timer: null, unsub: [] }
|
|
41
|
+
sessions.set(record.id, record)
|
|
42
|
+
for (const type of events) record.unsub.push(ctl.on(type, payload => publish(record, type, payload)))
|
|
43
|
+
return record
|
|
44
|
+
}
|
|
45
|
+
function publish(record, type, payload) {
|
|
46
|
+
if (type !== 'change') record.events.push({ type, payload: plain(type === 'project' ? null : payload) })
|
|
47
|
+
if (!record.timer) record.timer = setTimeout(() => {
|
|
48
|
+
record.timer = null
|
|
49
|
+
const update = { type: 'update', id: record.id, snapshot: snapshot(record.ctl), events: record.events.splice(0) }
|
|
50
|
+
for (const client of record.views) client.send(update)
|
|
51
|
+
for (const client of clients) client.send({ type: 'workspace' })
|
|
52
|
+
}, batchMs)
|
|
53
|
+
}
|
|
54
|
+
async function dispose(record) {
|
|
55
|
+
if (!sessions.delete(record.id)) return
|
|
56
|
+
clearTimeout(record.timer)
|
|
57
|
+
record.unsub.forEach(fn => fn())
|
|
58
|
+
await record.ctl.shutdown()
|
|
59
|
+
await record.dispose?.()
|
|
60
|
+
if (!sessions.size) onEmpty()
|
|
61
|
+
}
|
|
62
|
+
async function detach(client, id) {
|
|
63
|
+
const record = sessions.get(id)
|
|
64
|
+
if (!record) return
|
|
65
|
+
record.views.delete(client)
|
|
66
|
+
if (!record.views.size && !named(record.ctl)) await dispose(record)
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
disconnect(client) { clients.delete(client); return serial(async () => { for (const record of [...sessions.values()]) await detach(client, record.id) }) },
|
|
70
|
+
dispatch(client, request) {
|
|
71
|
+
if (client) clients.add(client)
|
|
72
|
+
if (request.op === 'interrupt') {
|
|
73
|
+
const record = sessions.get(request.id)
|
|
74
|
+
if (!record) return Promise.reject(new Error('session is no longer running'))
|
|
75
|
+
record.ctl.interrupt()
|
|
76
|
+
publish(record, 'change')
|
|
77
|
+
return Promise.resolve()
|
|
78
|
+
}
|
|
79
|
+
return serial(async () => {
|
|
80
|
+
if (closed) throw new Error('daemon is shutting down')
|
|
81
|
+
const { op, id, args = [] } = request
|
|
82
|
+
if (op === 'list') return [...sessions.values()].map(r => {
|
|
83
|
+
const ctl = r.ctl
|
|
84
|
+
const tool = [...(ctl.state.overlay || [])].reverse().find(item => item.kind === 'tool')
|
|
85
|
+
const message = [...(ctl.state.events || [])].reverse().find(event => event.type === 'message' && event.data.message.role === 'assistant')
|
|
86
|
+
const content = message?.data.message.content
|
|
87
|
+
return { id: r.id, sessionId: ctl.state.session?.id, name: ctl.state.derived?.title || null, title: ctl.state.derived?.title || '', cwd: ctl.boot.cwd, root: ctl.boot.root, color: ctl.state.derived?.color, status: busy(ctl) ? 'busy' : 'idle', busy: !!busy(ctl), activity: tool?.description || tool?.title || (busy(ctl) ? ctl.state.turnPhase || 'working' : null), lastMessageAt: message?.at || null, lastMessage: typeof content === 'string' ? content : content?.filter(part => part.type === 'text').map(part => part.text).join('\n') || '', views: r.views.size }
|
|
88
|
+
})
|
|
89
|
+
if (op === 'create') {
|
|
90
|
+
const record = await createRecord(client, args[0] || {})
|
|
91
|
+
return { id: record.id, snapshot: snapshot(record.ctl) }
|
|
92
|
+
}
|
|
93
|
+
const record = sessions.get(id)
|
|
94
|
+
if (!record) throw new Error('session is no longer running')
|
|
95
|
+
if (op === 'attach') { record.views.add(client); return { id, snapshot: snapshot(record.ctl) } }
|
|
96
|
+
if (op === 'switch') {
|
|
97
|
+
const [method, value] = args
|
|
98
|
+
if (!record.views.has(client)) throw new Error('attach to the session first')
|
|
99
|
+
let meta = ['resume', 'switchProject'].includes(method) ? value : null
|
|
100
|
+
if (meta) {
|
|
101
|
+
const existing = [...sessions.values()].find(r => r.ctl.state.session?.id === meta.header.id)
|
|
102
|
+
if (existing) {
|
|
103
|
+
existing.views.add(client)
|
|
104
|
+
if (existing !== record) await detach(client, id)
|
|
105
|
+
return { id: existing.id, snapshot: snapshot(existing.ctl) }
|
|
106
|
+
}
|
|
107
|
+
const saved = await loadSession(meta.file)
|
|
108
|
+
meta = { ...meta, header: saved.header }
|
|
109
|
+
}
|
|
110
|
+
if (method === 'fork') {
|
|
111
|
+
if (busy(record.ctl)) throw new Error('finish or interrupt the current turn first')
|
|
112
|
+
const forked = await forkSession({ source: record.ctl.state.session, cwd: record.ctl.boot.cwd, root: record.ctl.boot.root, events: record.ctl.state.events })
|
|
113
|
+
meta = { file: forked.session.file, header: forked.session.header }
|
|
114
|
+
}
|
|
115
|
+
if (!['newSession', 'resume', 'switchProject', 'switchToWorktree', 'fork'].includes(method)) throw new Error('unsupported session switch')
|
|
116
|
+
const next = await createRecord(client, { cwd: meta?.header.cwd || meta?.header.root || value?.root || record.ctl.boot.cwd, version: record.ctl.boot.version, theme: record.ctl.boot.theme, detectedTheme: record.ctl.boot.detectedTheme, themePref: record.ctl.boot.themePref })
|
|
117
|
+
try {
|
|
118
|
+
if (meta) {
|
|
119
|
+
await next.ctl.resume(meta)
|
|
120
|
+
if (next.ctl.state.session?.id !== meta.header.id) throw new Error('session could not be resumed')
|
|
121
|
+
}
|
|
122
|
+
if (method === 'newSession' && typeof value === 'string' && value.trim()) {
|
|
123
|
+
const name = value.trim()
|
|
124
|
+
const renamed = await next.ctl.rename(name)
|
|
125
|
+
if (renamed === false || next.ctl.state.derived?.title !== name) throw new Error(`could not create session named "${name}"`)
|
|
126
|
+
}
|
|
127
|
+
await detach(client, id)
|
|
128
|
+
return { id: next.id, snapshot: snapshot(next.ctl) }
|
|
129
|
+
} catch (error) { await dispose(next); throw error }
|
|
130
|
+
}
|
|
131
|
+
if (op === 'detach') { await detach(client, id); return }
|
|
132
|
+
if (!record.views.has(client) && !['demote', 'interrupt'].includes(op)) throw new Error('attach to the session first')
|
|
133
|
+
if (op === 'interrupt') { record.ctl.interrupt(); publish(record, 'change'); return }
|
|
134
|
+
if (op === 'demote') {
|
|
135
|
+
if (busy(record.ctl)) throw new Error('interrupt the session before clearing its name')
|
|
136
|
+
const renamed = await record.ctl.rename('')
|
|
137
|
+
if (renamed === false || named(record.ctl)) throw new Error('session name could not be cleared')
|
|
138
|
+
if (!record.views.size) await dispose(record)
|
|
139
|
+
else publish(record, 'change')
|
|
140
|
+
return
|
|
141
|
+
}
|
|
142
|
+
if (op === 'call') {
|
|
143
|
+
const [target, method, ...values] = args
|
|
144
|
+
const allowedServices = { shells: ['kill', 'dismiss', 'output'], wakeups: ['cancel'], git: ['refresh', 'setEnabled'], mcp: ['connectAll', 'add', 'update', 'remove', 'toggle', 'reconnect'], memory: ['list', 'setDisabled', 'forget'], boot: ['refreshModels'] }
|
|
145
|
+
if (target !== 'controller' && !allowedServices[target]?.includes(method)) throw new Error('unsupported service action')
|
|
146
|
+
const object = target === 'controller' ? record.ctl : target === 'boot' ? record.ctl.boot : record.ctl.boot[target]
|
|
147
|
+
if (!object || typeof object[method] !== 'function' || method.startsWith('_') || ['shutdown', 'on', 'constructor', '__proto__'].includes(method)) throw new Error('unsupported daemon action')
|
|
148
|
+
if (target === 'controller' && ['newSession', 'resume', 'switchProject', 'switchToWorktree', 'fork'].includes(method)) throw new Error('session switches require a separate owner')
|
|
149
|
+
if (target === 'controller' && method === 'rename' && !String(values[0] || '').trim() && busy(record.ctl)) throw new Error('interrupt the session before clearing its name')
|
|
150
|
+
if (target === 'controller' && method === 'compact') {
|
|
151
|
+
Promise.resolve(object[method](...values)).catch(error => publish(record, 'flash', error.message))
|
|
152
|
+
publish(record, 'change')
|
|
153
|
+
return { result: undefined, snapshot: snapshot(record.ctl) }
|
|
154
|
+
}
|
|
155
|
+
const result = await object[method](...values)
|
|
156
|
+
publish(record, 'change')
|
|
157
|
+
return { result, snapshot: snapshot(record.ctl) }
|
|
158
|
+
}
|
|
159
|
+
if (op === 'configure') {
|
|
160
|
+
const allowed = ['researchModel', 'shellModel', 'deliberationModel', 'participantAModel', 'participantBModel', 'researchAgentLimit', 'clouds', 'compactToolHistory', 'gitFooter', 'wideSidebar']
|
|
161
|
+
for (const [key, value] of Object.entries(args[0])) { if (!allowed.includes(key)) throw new Error('unsupported session setting'); record.ctl.boot[key] = value }
|
|
162
|
+
publish(record, 'change')
|
|
163
|
+
return
|
|
164
|
+
}
|
|
165
|
+
throw new Error('unsupported daemon operation')
|
|
166
|
+
}) },
|
|
167
|
+
close() { return serial(async () => { closed = true; for (const record of [...sessions.values()]) await dispose(record) }) },
|
|
168
|
+
}
|
|
169
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import net from 'node:net'
|
|
2
|
+
import { mkdir, lstat, chmod, unlink } from 'node:fs/promises'
|
|
3
|
+
import { join } from 'node:path'
|
|
4
|
+
import { createHash } from 'node:crypto'
|
|
5
|
+
import { tmpdir } from 'node:os'
|
|
6
|
+
import { spawn } from 'node:child_process'
|
|
7
|
+
import lockfile from 'proper-lockfile'
|
|
8
|
+
import { picoHome } from './paths.js'
|
|
9
|
+
import { wire } from './daemon-wire.js'
|
|
10
|
+
import { createDaemonRuntime } from './daemon-runtime.js'
|
|
11
|
+
|
|
12
|
+
export function daemonPaths(home = picoHome()) {
|
|
13
|
+
const hash = createHash('sha256').update(home).digest('hex').slice(0, 20)
|
|
14
|
+
const directory = join(tmpdir(), `pico-${process.getuid?.() ?? 'user'}-${hash}`)
|
|
15
|
+
return { directory, socket: join(directory, 'daemon.sock') }
|
|
16
|
+
}
|
|
17
|
+
async function privateDirectory(directory) {
|
|
18
|
+
await mkdir(directory, { recursive: true, mode: 0o700 })
|
|
19
|
+
const stat = await lstat(directory)
|
|
20
|
+
if (!stat.isDirectory() || stat.isSymbolicLink() || stat.uid !== process.getuid()) throw new Error('unsafe daemon directory')
|
|
21
|
+
await chmod(directory, 0o700)
|
|
22
|
+
}
|
|
23
|
+
export async function connectDaemon({ socket: path = daemonPaths().socket } = {}) {
|
|
24
|
+
const socket = net.createConnection(path)
|
|
25
|
+
await new Promise((resolve, reject) => { socket.once('connect', resolve); socket.once('error', reject) })
|
|
26
|
+
const pending = new Map()
|
|
27
|
+
const listeners = new Set()
|
|
28
|
+
let sequence = 0
|
|
29
|
+
const send = wire(socket, message => {
|
|
30
|
+
if (message.type === 'reply') {
|
|
31
|
+
const waiter = pending.get(message.request)
|
|
32
|
+
if (!waiter) return
|
|
33
|
+
pending.delete(message.request)
|
|
34
|
+
if (message.error) waiter.reject(new Error(message.error))
|
|
35
|
+
else waiter.resolve(message.value)
|
|
36
|
+
} else for (const listener of listeners) listener(message)
|
|
37
|
+
})
|
|
38
|
+
socket.on('close', () => {
|
|
39
|
+
for (const waiter of pending.values()) waiter.reject(new Error('daemon disconnected; running work was not restarted'))
|
|
40
|
+
pending.clear()
|
|
41
|
+
for (const listener of listeners) listener({ type: 'disconnect' })
|
|
42
|
+
})
|
|
43
|
+
return {
|
|
44
|
+
request(op, id, args = []) {
|
|
45
|
+
const result = new Promise((resolve, reject) => {
|
|
46
|
+
if (socket.destroyed) return reject(new Error('daemon disconnected'))
|
|
47
|
+
const request = ++sequence
|
|
48
|
+
pending.set(request, { resolve, reject })
|
|
49
|
+
send({ request, op, id, args })
|
|
50
|
+
})
|
|
51
|
+
result.catch(() => {})
|
|
52
|
+
return result
|
|
53
|
+
},
|
|
54
|
+
on(fn) { listeners.add(fn); return () => listeners.delete(fn) },
|
|
55
|
+
close() { socket.end() },
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export async function ensureDaemon({ entry, paths = daemonPaths(), startupTimeout = 30000, env = process.env } = {}) {
|
|
59
|
+
await privateDirectory(paths.directory)
|
|
60
|
+
try { return await connectDaemon(paths) } catch (error) { if (!['ENOENT', 'ECONNREFUSED'].includes(error.code)) throw error }
|
|
61
|
+
const release = await lockfile.lock(paths.directory, { realpath: false, stale: 60000, retries: { retries: 350, minTimeout: 20, maxTimeout: 100 } })
|
|
62
|
+
try {
|
|
63
|
+
try { return await connectDaemon(paths) } catch (error) { if (!['ENOENT', 'ECONNREFUSED'].includes(error.code)) throw error }
|
|
64
|
+
if (!entry) throw new Error('daemon entry is required for automatic startup')
|
|
65
|
+
await unlink(paths.socket).catch(error => { if (error.code !== 'ENOENT') throw error })
|
|
66
|
+
const child = spawn(process.execPath, [entry, '--socket', paths.socket], { detached: true, stdio: 'ignore', env })
|
|
67
|
+
child.unref()
|
|
68
|
+
let failure
|
|
69
|
+
child.once('error', error => { failure = error })
|
|
70
|
+
child.once('exit', code => { failure = new Error(`daemon startup failed (${code})`) })
|
|
71
|
+
const deadline = Date.now() + startupTimeout
|
|
72
|
+
while (Date.now() < deadline) {
|
|
73
|
+
if (failure) throw failure
|
|
74
|
+
try { return await connectDaemon(paths) } catch (error) { if (!['ENOENT', 'ECONNREFUSED'].includes(error.code)) throw error }
|
|
75
|
+
await new Promise(resolve => setTimeout(resolve, 25))
|
|
76
|
+
}
|
|
77
|
+
child.kill('SIGTERM')
|
|
78
|
+
throw new Error('daemon startup timed out')
|
|
79
|
+
} finally { await release() }
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export async function serveDaemon({ paths = daemonPaths(), createSession, idleMs = 1000, onClose = () => {} }) {
|
|
83
|
+
await privateDirectory(paths.directory)
|
|
84
|
+
const clients = new Set()
|
|
85
|
+
let closing = false
|
|
86
|
+
let idle
|
|
87
|
+
const scheduleIdle = () => {
|
|
88
|
+
if (closing) return
|
|
89
|
+
clearTimeout(idle)
|
|
90
|
+
idle = setTimeout(async () => {
|
|
91
|
+
const rows = await runtime.dispatch(null, { op: 'list' }).catch(() => [])
|
|
92
|
+
if (!rows.length) await close()
|
|
93
|
+
}, idleMs)
|
|
94
|
+
}
|
|
95
|
+
const runtime = createDaemonRuntime({ createSession, onEmpty: scheduleIdle })
|
|
96
|
+
const server = net.createServer(socket => {
|
|
97
|
+
clearTimeout(idle)
|
|
98
|
+
const client = { send: null, socket }
|
|
99
|
+
clients.add(client)
|
|
100
|
+
client.send = wire(socket, message => {
|
|
101
|
+
runtime.dispatch(client, message).then(value => client.send({ type: 'reply', request: message.request, value }), error => client.send({ type: 'reply', request: message.request, error: error.message }))
|
|
102
|
+
})
|
|
103
|
+
socket.once('close', () => { clients.delete(client); runtime.disconnect(client).finally(scheduleIdle) })
|
|
104
|
+
scheduleIdle()
|
|
105
|
+
})
|
|
106
|
+
await new Promise((resolve, reject) => { server.once('error', reject); server.listen(paths.socket, resolve) })
|
|
107
|
+
await chmod(paths.socket, 0o600)
|
|
108
|
+
scheduleIdle()
|
|
109
|
+
async function close() {
|
|
110
|
+
if (closing) return
|
|
111
|
+
closing = true
|
|
112
|
+
clearTimeout(idle)
|
|
113
|
+
for (const client of clients) client.socket.destroy()
|
|
114
|
+
await runtime.close()
|
|
115
|
+
await new Promise(resolve => server.close(resolve))
|
|
116
|
+
await unlink(paths.socket).catch(error => { if (error.code !== 'ENOENT') throw error })
|
|
117
|
+
onClose()
|
|
118
|
+
}
|
|
119
|
+
return { close, runtime }
|
|
120
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { serialize, deserialize } from 'node:v8'
|
|
2
|
+
|
|
3
|
+
export function plain(value, seen = new Set()) {
|
|
4
|
+
if (typeof value === 'function' || typeof value === 'symbol') return undefined
|
|
5
|
+
if (!value || typeof value !== 'object') return value
|
|
6
|
+
if (seen.has(value)) return undefined
|
|
7
|
+
seen.add(value)
|
|
8
|
+
let result
|
|
9
|
+
if (value instanceof Map) result = new Map([...value].map(([k, v]) => [plain(k, seen), plain(v, seen)]))
|
|
10
|
+
else if (value instanceof Set) result = new Set([...value].map(v => plain(v, seen)))
|
|
11
|
+
else if (Buffer.isBuffer(value)) result = value
|
|
12
|
+
else if (Array.isArray(value)) result = value.map(v => plain(v, seen))
|
|
13
|
+
else { result = {}; for (const [k, v] of Object.entries(value)) { const next = plain(v, seen); if (next !== undefined) result[k] = next } }
|
|
14
|
+
seen.delete(value)
|
|
15
|
+
return result
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function wire(socket, receive, fail = () => {}) {
|
|
19
|
+
const limit = 64 * 1024 * 1024
|
|
20
|
+
let buffer = Buffer.alloc(0)
|
|
21
|
+
socket.on('data', chunk => {
|
|
22
|
+
buffer = Buffer.concat([buffer, chunk])
|
|
23
|
+
try {
|
|
24
|
+
while (buffer.length >= 4) {
|
|
25
|
+
const size = buffer.readUInt32BE(0)
|
|
26
|
+
if (size > limit) throw new Error('daemon frame exceeds limit')
|
|
27
|
+
if (buffer.length < size + 4) break
|
|
28
|
+
const message = deserialize(buffer.subarray(4, size + 4))
|
|
29
|
+
buffer = buffer.subarray(size + 4)
|
|
30
|
+
receive(message)
|
|
31
|
+
}
|
|
32
|
+
} catch (error) { fail(error); socket.destroy() }
|
|
33
|
+
})
|
|
34
|
+
socket.on('error', fail)
|
|
35
|
+
return message => {
|
|
36
|
+
const body = serialize(plain(message))
|
|
37
|
+
if (body.length > limit || socket.writableLength > limit) { socket.destroy(); return false }
|
|
38
|
+
const header = Buffer.alloc(4)
|
|
39
|
+
header.writeUInt32BE(body.length)
|
|
40
|
+
socket.write(Buffer.concat([header, body]))
|
|
41
|
+
return true
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { deriveState } from './derive.js'
|
|
2
|
+
|
|
3
|
+
export async function createRemoteController(connection, { id, options = {}, localBoot = {} } = {}) {
|
|
4
|
+
const initial = await connection.request(id ? 'attach' : 'create', id, id ? [] : [options])
|
|
5
|
+
id = initial.id
|
|
6
|
+
const state = {}
|
|
7
|
+
const boot = { refs: {}, ...localBoot }
|
|
8
|
+
const listeners = new Map()
|
|
9
|
+
let current
|
|
10
|
+
let previewId = null
|
|
11
|
+
let previewQueue = Promise.resolve()
|
|
12
|
+
const displayedId = () => previewId || id
|
|
13
|
+
const emit = (type, value) => { for (const fn of listeners.get(type) || []) fn(value) }
|
|
14
|
+
const call = async (target, method, ...args) => {
|
|
15
|
+
const reply = await connection.request('call', id, [target, method, ...args])
|
|
16
|
+
apply(reply.snapshot)
|
|
17
|
+
emit('change', state)
|
|
18
|
+
return reply.result
|
|
19
|
+
}
|
|
20
|
+
function apply(snapshot) {
|
|
21
|
+
current = snapshot
|
|
22
|
+
for (const key of Object.keys(state)) if (!(key in snapshot.state)) delete state[key]
|
|
23
|
+
const session = state.session
|
|
24
|
+
Object.assign(state, snapshot.state)
|
|
25
|
+
if (session && session.id === state.session?.id) { Object.assign(session, state.session); state.session = session }
|
|
26
|
+
Object.assign(boot, snapshot.boot)
|
|
27
|
+
for (const key of ['researchModel', 'shellModel', 'deliberationModel', 'participantAModel', 'participantBModel']) {
|
|
28
|
+
if (key in snapshot.boot) boot[key] = snapshot.boot[key]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
apply(initial.snapshot)
|
|
32
|
+
for (const [target, methods] of Object.entries({
|
|
33
|
+
shells: ['kill', 'dismiss', 'output'], wakeups: ['cancel'], git: ['refresh', 'setEnabled'],
|
|
34
|
+
mcp: ['connectAll', 'add', 'update', 'remove', 'toggle', 'reconnect'], memory: ['list', 'setDisabled', 'forget'],
|
|
35
|
+
})) {
|
|
36
|
+
boot[target] = {}
|
|
37
|
+
for (const method of methods) boot[target][method] = (...args) => call(target, method, ...args)
|
|
38
|
+
}
|
|
39
|
+
for (const [target, methods] of Object.entries(current.services)) {
|
|
40
|
+
boot[target] ||= {}
|
|
41
|
+
for (const method of Object.keys(methods)) boot[target][method] = () => current.services[target]?.[method]
|
|
42
|
+
}
|
|
43
|
+
if (boot.shells) boot.shells.output = id => current.services.shells?.outputs?.[id]
|
|
44
|
+
boot.refreshModels = () => call('boot', 'refreshModels')
|
|
45
|
+
const controller = {
|
|
46
|
+
state, boot, id,
|
|
47
|
+
on(type, fn) { if (!listeners.has(type)) listeners.set(type, new Set()); listeners.get(type).add(fn); return () => listeners.get(type)?.delete(fn) },
|
|
48
|
+
agents: { list: () => current.agents, get: id => current.agents.find(a => String(a.id) === String(id)) || null },
|
|
49
|
+
async shutdown() { await previewQueue; if (previewId) await connection.request('detach', previewId); await connection.request('detach', id); unsubscribe() },
|
|
50
|
+
configure: settings => connection.request('configure', id, [settings]),
|
|
51
|
+
interrupt: () => connection.request('interrupt', id),
|
|
52
|
+
demote: () => connection.request('demote', id),
|
|
53
|
+
listOwnedSessions: () => connection.request('list'),
|
|
54
|
+
async selectOwnedSession(nextId) {
|
|
55
|
+
await previewQueue
|
|
56
|
+
if (nextId === id) { await clearPreview(); return }
|
|
57
|
+
const previous = id
|
|
58
|
+
const previousPreview = previewId
|
|
59
|
+
const next = await connection.request('attach', nextId)
|
|
60
|
+
previewId = null
|
|
61
|
+
if (previousPreview && previousPreview !== nextId) await connection.request('detach', previousPreview)
|
|
62
|
+
id = next.id
|
|
63
|
+
controller.id = id
|
|
64
|
+
apply(next.snapshot)
|
|
65
|
+
await connection.request('detach', previous)
|
|
66
|
+
emit('project', boot)
|
|
67
|
+
emit('session', state.session)
|
|
68
|
+
emit('change', state)
|
|
69
|
+
},
|
|
70
|
+
}
|
|
71
|
+
for (const method of current.methods) if (!(method in controller)) controller[method] = (...args) => call('controller', method, ...args)
|
|
72
|
+
for (const method of Object.keys(current.cached)) controller[method] = () => current.cached[method]
|
|
73
|
+
for (const method of ['newSession', 'resume', 'switchProject', 'switchToWorktree', 'fork']) controller[method] = async value => {
|
|
74
|
+
const next = await connection.request('switch', id, [method, value])
|
|
75
|
+
id = next.id
|
|
76
|
+
controller.id = id
|
|
77
|
+
apply(next.snapshot)
|
|
78
|
+
if (method === 'newSession' && typeof value === 'string' && value.trim() && state.derived?.title !== value.trim()) {
|
|
79
|
+
const renamed = await call('controller', 'rename', value.trim())
|
|
80
|
+
if (renamed === false || state.derived?.title !== value.trim()) throw new Error(`could not create session named "${value.trim()}"`)
|
|
81
|
+
}
|
|
82
|
+
emit('project', boot)
|
|
83
|
+
emit('session', state.session)
|
|
84
|
+
emit('change', state)
|
|
85
|
+
}
|
|
86
|
+
controller.previewSteer = changes => changes?.length ? deriveState([...state.events, { id: '__steer_preview__', at: Date.now(), type: 'steer', data: { changes } }]) : state.derived
|
|
87
|
+
function show(snapshot) {
|
|
88
|
+
apply(snapshot)
|
|
89
|
+
emit('project', boot)
|
|
90
|
+
emit('session', state.session)
|
|
91
|
+
emit('derived', state.derived)
|
|
92
|
+
emit('change', state)
|
|
93
|
+
}
|
|
94
|
+
async function clearPreview() {
|
|
95
|
+
if (!previewId) return
|
|
96
|
+
const previous = previewId
|
|
97
|
+
const original = await connection.request('attach', id)
|
|
98
|
+
previewId = null
|
|
99
|
+
show(original.snapshot)
|
|
100
|
+
await connection.request('detach', previous)
|
|
101
|
+
}
|
|
102
|
+
function preview(nextId) {
|
|
103
|
+
const task = previewQueue.then(async () => {
|
|
104
|
+
if (!nextId || nextId === id) return clearPreview()
|
|
105
|
+
if (nextId === previewId) return
|
|
106
|
+
const next = await connection.request('attach', nextId)
|
|
107
|
+
const previous = previewId
|
|
108
|
+
previewId = nextId
|
|
109
|
+
show(next.snapshot)
|
|
110
|
+
if (previous) await connection.request('detach', previous)
|
|
111
|
+
})
|
|
112
|
+
previewQueue = task.catch(() => {})
|
|
113
|
+
return task
|
|
114
|
+
}
|
|
115
|
+
boot.workspace = {
|
|
116
|
+
preview,
|
|
117
|
+
cancelPreview: () => preview(null),
|
|
118
|
+
list: async () => (await connection.request('list')).filter(row => row.name),
|
|
119
|
+
currentId: () => id,
|
|
120
|
+
subscribe: fn => connection.on(message => { if (message.type === 'workspace') fn() }),
|
|
121
|
+
select: nextId => controller.selectOwnedSession(nextId),
|
|
122
|
+
interrupt: nextId => connection.request('interrupt', nextId),
|
|
123
|
+
demote: nextId => connection.request('demote', nextId),
|
|
124
|
+
}
|
|
125
|
+
const unsubscribe = connection.on(message => {
|
|
126
|
+
if (message.type === 'disconnect') { state.busy = false; state.streaming = null; emit('flash', 'daemon disconnected; work was not restarted'); emit('change', state); return }
|
|
127
|
+
if (message.type !== 'update' || message.id !== displayedId()) return
|
|
128
|
+
apply(message.snapshot)
|
|
129
|
+
for (const event of message.events) {
|
|
130
|
+
if (previewId && ['input', 'question', 'resumed', 'flash'].includes(event.type)) continue
|
|
131
|
+
emit(event.type, event.type === 'project' ? boot : event.payload)
|
|
132
|
+
}
|
|
133
|
+
emit('change', state)
|
|
134
|
+
})
|
|
135
|
+
return controller
|
|
136
|
+
}
|
package/src/session.js
CHANGED
|
@@ -10,18 +10,20 @@ const writeFailures = new Map()
|
|
|
10
10
|
const creationFailures = new Map()
|
|
11
11
|
const deletedSessions = new Set()
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
const writeErrorListeners = new Set()
|
|
14
14
|
|
|
15
15
|
// appends are chained so they cannot interleave. a rejected link would poison
|
|
16
16
|
// every later append on that file, so failures are reported and absorbed here
|
|
17
17
|
// instead of propagating: one bad write must not silently end the log
|
|
18
18
|
export function onSessionWriteError(handler) {
|
|
19
|
-
|
|
19
|
+
if (!handler) { writeErrorListeners.clear(); return () => {} }
|
|
20
|
+
writeErrorListeners.add(handler)
|
|
21
|
+
return () => writeErrorListeners.delete(handler)
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
function reportWriteError(file, err) {
|
|
23
25
|
try {
|
|
24
|
-
|
|
26
|
+
for (const handler of writeErrorListeners) handler(err, file)
|
|
25
27
|
} catch {}
|
|
26
28
|
}
|
|
27
29
|
|