Desired behavior
Standalone mode serves the same provider-native Files API that #1185 adds for hybrid: upload, list, retrieve, download, and delete files at Anthropic or OpenAI through the official SDKs, and reference them from Anthropic Messages. Bytes stay at the provider; the local database holds ownership, quotas, and the cleanup queue.
Why
#1185 gates hybrid_files.router on is_hybrid_mode, so a standalone deployment with an Anthropic or OpenAI key cannot use container_upload or persistent provider files. It has to inline the file on every request through the local /api/v1/files extraction path instead.
The core is already mode-neutral: ProviderFileService, create_provider_files_router, the any-llm transport, the envelope adapters, and migration c3e5a7b9d1f4 all land in standalone too. What is missing is the wiring:
- Standalone
authenticate / authenticate_gateway / authorize_attempt callbacks for create_provider_files_router, resolving the local API key to a FileScope.
- A local account resolver that mints
ProviderAccountGeneration rows from provider_credentials and puts provider_account_generation_id on standalone attempts.
- An in-process sibling of
PlatformFilesClient so hybrid_files.py can reach ProviderFileService without the HTTP hop, and an in-process cleanup executor in the standalone lifespan.
Notes
Ref: #984
Desired behavior
Standalone mode serves the same provider-native Files API that #1185 adds for hybrid: upload, list, retrieve, download, and delete files at Anthropic or OpenAI through the official SDKs, and reference them from Anthropic Messages. Bytes stay at the provider; the local database holds ownership, quotas, and the cleanup queue.
Why
#1185 gates
hybrid_files.routeronis_hybrid_mode, so a standalone deployment with an Anthropic or OpenAI key cannot usecontainer_uploador persistent provider files. It has to inline the file on every request through the local/api/v1/filesextraction path instead.The core is already mode-neutral:
ProviderFileService,create_provider_files_router, the any-llm transport, the envelope adapters, and migrationc3e5a7b9d1f4all land in standalone too. What is missing is the wiring:authenticate/authenticate_gateway/authorize_attemptcallbacks forcreate_provider_files_router, resolving the local API key to aFileScope.ProviderAccountGenerationrows fromprovider_credentialsand putsprovider_account_generation_idon standalone attempts.PlatformFilesClientsohybrid_files.pycan reachProviderFileServicewithout the HTTP hop, and an in-process cleanup executor in the standalone lifespan.Notes
hybridmode #1185 merging.Ref: #984