Skip to content

feat: add OpenAI provider support#10

Open
rililive wants to merge 6 commits into
mainfrom
claude/openai-models-support-hvac49
Open

feat: add OpenAI provider support#10
rililive wants to merge 6 commits into
mainfrom
claude/openai-models-support-hvac49

Conversation

@rililive

Copy link
Copy Markdown

Adds OpenAI as a fourth model provider alongside Anthropic, Gemini, and
Ollama. Includes the OpenAI provider implementation, 7 models in the
catalog with verified June 2026 pricing, and automatic provider inference
when OPENAI_API_KEY is the only key present.

  • src/providers/openaiFormat.ts: extracted shared OpenAI wire-format
    helpers (message translation, SSE parsing) used by both Ollama and
    the new OpenAI provider
  • src/providers/openai.ts: OpenAIProvider streaming over
    /v1/chat/completions; uses max_completion_tokens for o-series compat
  • Provider + config wired end-to-end: OPENAI_API_KEY, TINY_CODE_OPENAI_URL,
    openaiBaseUrl for Azure/proxy overrides, escalateTo support
  • Catalog: o3, gpt-4.1, o4-mini, gpt-4o, gpt-4.1-mini, gpt-4o-mini,
    gpt-4.1-nano with pricing and coding scores

https://claude.ai/code/session_01TwQBmEkVM2JcZQYqV4jsZJ

claude and others added 6 commits June 10, 2026 12:52
Adds OpenAI as a fourth model provider alongside Anthropic, Gemini, and
Ollama. Includes the OpenAI provider implementation, 7 models in the
catalog with verified June 2026 pricing, and automatic provider inference
when OPENAI_API_KEY is the only key present.

- src/providers/openaiFormat.ts: extracted shared OpenAI wire-format
  helpers (message translation, SSE parsing) used by both Ollama and
  the new OpenAI provider
- src/providers/openai.ts: OpenAIProvider streaming over
  /v1/chat/completions; uses max_completion_tokens for o-series compat
- Provider + config wired end-to-end: OPENAI_API_KEY, TINY_CODE_OPENAI_URL,
  openaiBaseUrl for Azure/proxy overrides, escalateTo support
- Catalog: o3, gpt-4.1, o4-mini, gpt-4o, gpt-4.1-mini, gpt-4o-mini,
  gpt-4.1-nano with pricing and coding scores

https://claude.ai/code/session_01TwQBmEkVM2JcZQYqV4jsZJ
…nai-models-support-hvac49

# Conflicts:
#	.env.example
#	src/config/load.ts
#	src/models/catalog.ts
#	src/providers/index.ts
#	src/providers/ollama.ts
#	src/providers/types.ts
#	tests/config/load.test.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants