- Add 17 new Codex-related i18n keys across all locale files
- Replace hardcoded English strings in OAuth flow with i18n lookups
- Internationalize Codex error messages in `errors.go`
- Localize token exchange and refresh failure messages
- Translate OAuth callback server responses and browser fallback text
- Add translations for usage limit and request status errors
- Cover DE, EN, ES, FA, FR, IT, JA, PL, PT-BR, PT-PT, ZH locales
- Add `context.Context` parameter to `ListModels` interface method
- Add `context.Context` parameter to `SendStream` interface method
- Thread caller context through `Chatter.Send` instead of using `context.Background()`
- Update all vendor implementations to accept context parameter
- Introduce `publicError` type wrapping Codex provider errors
- Normalize Codex error messages to lowercase for consistency
- Add context-aware `sendStreamUpdate` helper in Codex client
- Remove stale `context.Background()` calls from Anthropic and Azure AI Gateway
- Update all vendor test mocks and stubs with new signatures
- Pass HTTP request context from server handler into `chatter.Send`
- Remove OAuth flow, PKCE, and token refresh from codex.go
- Remove auth transport round-trip retry logic
- Remove unused OAuth types and helper structs
- Remove JWT parsing and token expiry utilities
- Remove error mapping and usage limit detection helpers
- Remove browser-open and version normalization functions
- Add `.maestro/` directory to `.gitignore`
- Add test for `SendStream` HTTP error mapping and channel close
- Clean up unused imports from codex client package
- Bump `anthropic-sdk-go` from v1.23.0 to v1.27.1
- Upgrade AWS SDK Go v2 packages to latest patch versions
- Update `gin-gonic/gin` to v1.12.0 and `go-git` to v5.17.0
- Bump `ollama/ollama` from v0.16.2 to v0.18.2
- Upgrade `google.golang.org/api` to v0.272.0 and `genai` to v1.51.0
- Update OpenTelemetry packages to v1.42.0/v0.67.0
- Bump `golang.org/x` packages to latest minor versions
- Remove deprecated `ModelClaude4Sonnet20250514` and `ModelClaude4Opus20250514` aliases
- Add `go.mongodb.org/mongo-driver/v2` as new indirect dependency
- Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to static model list
- Place M2.7 models at the top of the list as new defaults
- Retain all previous models (M2.5, M2.5-highspeed, M2.5-lightning, M2, M2.1, M2.1-lightning) as alternatives
MiniMax-M2.7 is the latest flagship model with enhanced reasoning and coding capabilities.
## Bug: Streaming Deadlock in Chatter.Send
When a streaming error occurs, two goroutines can race to write to the
same buffered(1) error channel:
1. The SendStream goroutine returns an error and writes to errChan
2. The stream-update loop receives a StreamTypeError update and also
writes to errChan
Since errChan has a buffer of 1, the second write blocks forever,
causing a goroutine leak and a deadlock — the caller never returns.
### Fix
Introduce `recordFirstStreamError()` which uses a non-blocking
select/default to safely send only the first error, discarding
subsequent ones. This prevents the deadlock while preserving the
original error for the caller.
### Scenario that triggers the deadlock (before this fix):
1. Vendor stream emits a StreamTypeError update (e.g., rate limit)
2. The update loop writes the error to errChan (buffer fills)
3. SendStream also returns an error
4. SendStream goroutine tries to write to errChan → BLOCKS FOREVER
5. Chatter.Send never returns → user sees a hang
## Refactor: Unify Strategy Handling (Server + CLI)
The REST API server (chat.go) was loading strategy prompts inline by
reading JSON files directly with os.ReadFile, bypassing the core
Chatter layer entirely. This caused:
- Strategy prompts were prepended to UserInput instead of the system
message, breaking the prompt architecture
- The StrategyName was not passed to GetChatter(), so the core layer
had no knowledge of the strategy
- Duplicate strategy-loading logic between CLI and server paths
### Fix
- Pass StrategyName through to GetChatter() and ChatRequest so the
core Chatter.BuildSession() handles strategy loading uniformly
- Extract `buildPromptChatRequest()` helper for clean request
construction
- Remove inline os.ReadFile strategy loading from the server handler
## Refactor: Clean System Message Assembly
Replace raw string concatenation of context + pattern + strategy
prompts with `joinPromptSections()` which:
- Trims whitespace from each section
- Skips empty sections (no double newlines from missing context)
- Joins with a single newline separator
## Tests Added
- `TestChatter_BuildSession_SeparatesSystemSections`: Verifies
strategy, context, and pattern are joined with newline separators
in the correct order
- `TestChatter_Send_StreamingErrorUpdateAndReturnDoesNotDeadlock`:
Regression test with 2-second timeout that catches the deadlock
when both error paths fire simultaneously
- `TestBuildPromptChatRequest_PreservesStrategyAndUserInput`: Verifies
the extracted helper preserves all fields including StrategyName
- Add new Codex AI vendor plugin with OpenAI OAuth PKCE flow
- Implement browser-based login with automatic token refresh on 401
- Register Codex client in the plugin registry
- Allow explicit Codex model selection bypassing model listing
- Expose shared OpenAI `BuildResponseParams` and `ExtractText` helpers
- Move system/developer messages into Codex `instructions` field
- Add Codex i18n strings across all supported locales
- Add comprehensive unit tests for Codex OAuth, streaming, and retry
- Update README with Codex feature entry and provider listing
- Trim older changelog entries from README recent features section