Skip to content

feat(providers/llm): real OpenAI/Codex adapter (LLM_FALLBACK default) #15

@wesleysimplicio

Description

@wesleysimplicio

Context

CodexProvider at lib/providers/llm.ts:48-52 is a mock. Per PROVIDERS.md, OpenAI/Codex is the standard fallback for every Claude-defaulted task. The .env.example has LLM_FALLBACK=codex.

Goal

Real OpenAI adapter wrapping the chat completions API.

Acceptance criteria

  • Adapter uses openai SDK
  • Reads OPENAI_API_KEY from env
  • Defaults to gpt-5.1-mini (cheap fallback) for caption/translation, gpt-5.1 for script/compliance
  • Real tokens + cost_usd + latency_ms
  • Retry + timeout policy
  • Skipped when DRY_RUN=true
  • E2E spec with mocked HTTP asserts request shape

Files

  • lib/providers/llm.ts:48-52
  • package.json (new dep openai)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions