OpenAI and Azure OpenAI adapters added alongside existing Claude and Gemini
Commit `16a0799f` adds plain OpenAI and Azure OpenAI to the LLM adapter layer. New files cover streaming, tool-call assembly, deployment discovery, and a fast-model fallback chain that tries the user's pick first, then Gemini Flash Lite, then OpenAI nano, then Claude Haiku, then an AOAI default.
The plain OpenAI adapter in lib/llm/openai.ts implements the same StreamChatParams / StreamChatResult interface as the existing Claude and Gemini adapters. Tool calls are assembled from streaming deltas using the same schema upstream's tools expect, so existing tools pass through without changes. The package added is openai@^6.36.0.
The Azure OpenAI adapter in lib/llm/azureOpenai.ts wraps the same OpenAI SDK's AzureOpenAI client. Connection parameters resolve in order: user override, then env vars (AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_API_KEY, AZURE_OPENAI_API_VERSION). The API version defaults to 2024-10-21 if unset. Deployment comes from the model ID's aoai:<deployment> prefix rather than from a single env var - a deliberate design so the user can pick from discovered deployments rather than being locked to one default. The apiKey field is typed optional with a comment indicating Managed Identity auth is a separate ticket.
lib/llm/azureOpenaiDeployments.ts handles deployment discovery and exposes it via GET /llm/azure-openai/deployments in routes/llm.ts.
The fast-model resolver in lib/userSettings.ts walks: user's stored model pick first; if that's unavailable, Gemini Flash Lite; then gpt-4.1-nano; then Claude Haiku; then an AOAI default if configured. The chain is a reasonable resilience pattern independent of the Azure story.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?