feat(M3-003): OpenAI provider adapter for Codex gpt-5.4 #310
Reference in New Issue
Block a user
Delete Branch "feat/m3-openai-adapter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Test plan
Generated with Claude Code
Adds OpenAIAdapter implementing IProviderAdapter, replacing the legacy registerOpenAIProvider() inline registration in ProviderService. - Creates apps/gateway/src/agent/adapters/openai.adapter.ts with: - register(): initialises OpenAI client, registers codex-gpt-5-4 with Pi ModelRegistry using openai-completions API; skips gracefully when OPENAI_API_KEY is absent - listModels(): returns Codex gpt-5.4 ModelInfo (128k context, tools+vision) - healthCheck(): lightweight GET /v1/models to verify API key validity - createCompletion(): streaming completions via openai SDK chat.completions.create({ stream: true }); maps chunks to CompletionEvent - Installs openai SDK (^6.32.0) as a dependency in apps/gateway - Registers OpenAIAdapter in ProviderService alongside OllamaAdapter - Removes legacy registerOpenAIProvider() private method from ProviderService Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>6f104d116bto9b4d03cf30