Loading workspace insights... Statistics interval
7 days30 daysLatest CI Pipeline Executions
2e2aa270 feat(ai): native Files API support across providers (upload adapters + `file` content source)
Add first-class support for provider Files / storage APIs so callers can
upload media once and reference it by a provider-issued handle instead of
re-sending base64 or a public URL each request.
- New tree-shakeable `files` adapter kind: openaiFiles(), anthropicFiles(),
geminiFiles(), falFiles() — each with upload(), plus get()/delete() where
the provider has a lifecycle API (fal is upload-only). Driven by the new
uploadFile()/getFile()/deleteFile() activity functions.
- New `{ type: 'file' }` arm on ContentPartSource. Adapters map it to the
provider's native reference: OpenAI (Responses) input_image/input_file
file_id, Anthropic file_id source (sends the files-api-2025-04-14 beta),
Gemini fileData.fileUri, fal storage URL. fileSourceFromHandle() builds
the source from an uploaded FileHandle.
- Runtime provider routing: a handle only routes to its issuing provider;
cross-provider handles and endpoints that require raw bytes (image edits,
Veo, Chat Completions images, Bedrock, Mistral, Grok, OpenRouter, Ollama)
throw a clear error instead of silently mis-mapping.
Closes #909
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>