Skip to content

feat(providers): add OpenAI API provider option - #31898

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-369730d9
May 25, 2026
Merged

teknium1 merged 2 commits into
mainfrom
hermes/hermes-369730d9

Conversation

@teknium1

@teknium1 teknium1 commented May 25, 2026

Copy link
Copy Markdown
Collaborator

Salvage of #21437 by @jacevys onto current main + small follow-ups.

Summary

Adds openai-api as a first-class provider so users can configure direct api.openai.com access with OPENAI_API_KEY from the model picker — no more custom-provider workaround. Also unlocks OpenAI's data-sharing free daily tokens on smaller models for users who opt in.

Changes

  • hermes_cli/auth.py: openai-api ProviderConfig (api.openai.com, OPENAI_API_KEY, OPENAI_BASE_URL).
  • hermes_cli/providers.py: HermesOverlay with transport=codex_responses (matches existing api.openai.com auto-detection).
  • hermes_cli/models.py: curated model list + picker entry directly after OpenAI Codex.
  • hermes_cli/main.py: routes through the generic API-key model setup flow.
  • Follow-up: provider_model_ids() now also matches normalized == 'openai-api' so users get the live /v1/models catalog (jacevys' original only covered the legacy 'openai' branch).
  • Follow-up: added gpt-5.5-pro and gpt-5.3-codex to the curated list for parity with the legacy 'openai' table that backs the fallback path.
  • AUTHOR_MAP entry for jacevys.

Validation

Before After
openai-api registered in PROVIDER_REGISTRY no yes (api.openai.com + OPENAI_API_KEY)
Appears in hermes model picker after OpenAI Codex no yes (position 6, codex at 5)
resolve_runtime_provider for openai-api n/a provider=openai-api, api_mode=codex_responses, base_url=https://api.openai.com/v1
Live /v1/models fetch for openai-api falls through (curated only) hits api.openai.com/v1/models when OPENAI_API_KEY set
Curated list contains gpt-5.5-pro / gpt-5.3-codex no yes (10 entries total)

Cherry-picked from contributor branch onto current origin/main; original PR #21437 will be closed pointing here for credit.

Closes #21437

Infographic

openai-api-provider

jacevys and others added 2 commits May 24, 2026 23:04
….5-pro

Follow-up on top of @jacevys' PR #21437 cherry-pick:
- _provider_model_ids() now also matches normalized == 'openai-api' for
  the live /v1/models fetch path, so users see the full catalog instead
  of just the curated list.
- Add gpt-5.5-pro and gpt-5.3-codex to the curated list for parity with
  the existing 'openai' table (used as fallback when /v1/models fails).
- Add scripts/release.py AUTHOR_MAP entry for jacevys so CI doesn't
  block the salvage PR.
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-369730d9 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9123 on HEAD, 9123 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4869 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard provider/openai OpenAI / Codex Responses API labels May 25, 2026
@teknium1
teknium1 merged commit a6b0414 into main May 25, 2026
26 checks passed
@teknium1
teknium1 deleted the hermes/hermes-369730d9 branch May 25, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have provider/openai OpenAI / Codex Responses API type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants