- Dynamic x-api-provider selection for OpenAI endpoint based on model
- Models with '-max' suffix use 'openai' provider
- Other models use 'azure_openai' provider
- Fixes gpt-5.1-codex-max model compatibility issue
- Update default User-Agent to factory-cli/0.32.1
- Add custom User-Agent field for Droid accounts
- Backend: userAgent field in createAccount and updateAccount
- Frontend: User-Agent input in account creation/edit UI
- Supports all Droid auth modes: OAuth, Manual, API Key
This resolves the issue where gpt-5.1-codex-max failed with 'Azure OpenAI only supports...' error due to incorrect provider header.
The _parseOpenAIUsageFromSSE method was not capturing cache-related
tokens (cache_read_input_tokens, cache_creation_input_tokens) from
OpenAI format responses, while the Anthropic endpoint correctly
captured them.
This fix adds extraction of:
- cached_tokens from input_tokens_details
- cache_creation_input_tokens from both input_tokens_details and
top-level usage object
This ensures proper cache statistics tracking and cost calculation
for OpenAI models (like GPT-5/Codex) when using the Droid provider.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>