Summary
OpenAI GPT models work today via --provider openai-compatible by pointing --base-url
to https://api.openai.com/v1, but there is no named openai provider shorthand. This
causes confusion since users expect to type --provider openai the same way they can
type --provider anthropic.
Problem
- Users must know to set
--base-url https://api.openai.com/v1 manually
- No clear provider-specific validation or defaults for OpenAI
gpt-4o, o3, o1 models require max_completion_tokens instead of max_tokens
— this is handled internally but never surfaced to users
Proposed Solution
Add an explicit openai provider option:
codewiki config set --provider openai --api-key YOUR_OPENAI_KEY --main-model gpt-4o
- Auto-sets
base_url to https://api.openai.com/v1
- Documents the
max_completion_tokens behaviour for o-series models
Files Affected
codewiki/src/be/llm_services.py — add openai provider routing
codewiki/src/config.py — add openai to provider list with sensible defaults
README.md — add OpenAI example
Acceptance Criteria
Summary
OpenAI GPT models work today via
--provider openai-compatibleby pointing--base-urlto
https://api.openai.com/v1, but there is no namedopenaiprovider shorthand. Thiscauses confusion since users expect to type
--provider openaithe same way they cantype
--provider anthropic.Problem
--base-url https://api.openai.com/v1manuallygpt-4o,o3,o1models requiremax_completion_tokensinstead ofmax_tokens— this is handled internally but never surfaced to users
Proposed Solution
Add an explicit
openaiprovider option:codewiki config set --provider openai --api-key YOUR_OPENAI_KEY --main-model gpt-4obase_urltohttps://api.openai.com/v1max_completion_tokensbehaviour for o-series modelsFiles Affected
codewiki/src/be/llm_services.py— addopenaiprovider routingcodewiki/src/config.py— addopenaito provider list with sensible defaultsREADME.md— add OpenAI exampleAcceptance Criteria
--provider openaiaccepted, base URL auto-setgpt-4o,o3,o1models out of the box