Skip to content

feat: add UberLLM as a named AI provider - #596

Merged
di-sukharev merged 2 commits into
di-sukharev:masterfrom
al-global-tech:add-uberllm-provider
Nov 13, 2026
Merged

di-sukharev merged 2 commits into
di-sukharev:masterfrom
al-global-tech:add-uberllm-provider

Conversation

@al-global-tech

Copy link
Copy Markdown
Contributor

Summary

Adds UberLLM as a named AI provider (OCO_AI_PROVIDER=uberllm). It is an OpenAI-compatible gateway, so UberLLMEngine reuses OpenAiEngine and only sets the base URL (https://api.uberllm.dev/v1) and providerName, the same way OrcaRouterEngine does. OCO_API_URL still overrides the base URL.

oco models fetches the live catalog from https://api.uberllm.dev/v1/models. Without ?type= that endpoint returns chat (text-output) models only, so no modality filter is needed. The default and recommended model is deepseek/deepseek-v3.2. I picked it because it answers directly: the DeepSeek V4 flash ids on UberLLM reason first, and with a small token limit they returned an empty commit message.

Mirrors #582.

Changes

  • src/engine/uberllm.ts: new UberLLMEngine
  • src/utils/provider.ts: OCO_AI_PROVIDER_ENUM.UBERLLM and its apiKey requirement
  • src/commands/config.ts: MODEL_LIST.uberllm, default model, API key URL, recommended model, validator lists
  • src/utils/engine.ts: engine dispatch
  • src/utils/errors.ts: billing URL and recommended model
  • src/utils/modelCache.ts: fetchUberLLMModels
  • src/commands/setup.ts: setup entry "UberLLM (OpenAI-compatible gateway)"
  • README.md: provider list and a "Use UberLLM as the model gateway" section
  • test/unit/uberllm.test.ts, test/unit/modelCache.test.ts, test/unit/setup.test.ts: provider coverage
  • out/cli.cjs: rebuilt with npm run build

Verification

  • npm test: 23 suites, 210 tests pass
  • tsc --noEmit: 0 errors
  • biome check . --diagnostic-level=error: clean
  • prettier --check src test README.md: clean
  • npm run build: succeeds, and out/cli.cjs changes only by the uberllm wiring
  • Live: getEngine() with OCO_AI_PROVIDER=uberllm and a real key resolved https://api.uberllm.dev/v1, and generateCommitMessage returned a message for a one-line README diff. fetchUberLLMModels returned 263 models, including the default.

Tested with deepseek/deepseek-v3.2: returned "chore: add npm test instruction to README" for a one-line README diff.

Per-model prices are listed at https://uberllm.dev/models and are usually below list price. Credit is prepaid from $5, and there is no monthly fee.

I work on UberLLM.

@di-sukharev

Copy link
Copy Markdown
Owner

fresh setup fails in migration 00. please fix this path and add a cli test.

A fresh setup that picks uberllm (or orcarouter) writes a global config
with no completed migrations. The next run then hit migration 00, which
throws for providers that never had legacy per-provider keys, and exited 1.

Add both providers to the skip list in _run.ts and add a CLI test that
runs oco against a fresh uberllm config with no migrations file.
@al-global-tech

Copy link
Copy Markdown
Contributor Author

Thanks for catching that. Fixed in 4266142:

  • src/migrations/_run.ts: uberllm is now in the list of providers that skip migration 00 (it never had legacy per-provider keys, so the migration threw and the run exited 1 right after a fresh setup). orcarouter had the same problem, so I added it too.
  • New CLI test in test/e2e/cliBehavior.test.ts: fresh HOME with the config the setup wizard writes (OCO_AI_PROVIDER=uberllm, no .opencommit_migrations), runs oco --yes against the mock server and checks it exits 0 and commits. It fails on the old code and passes now.
  • Rebased on master; out/cli.cjs carries the same one-line change.

npm run lint, unit tests (218) and cliBehavior.test.ts (24) pass locally.

@di-sukharev
di-sukharev merged commit a91794c into di-sukharev:master Nov 13, 2026
5 checks passed
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.

2 participants