Skip to content

feat: add UberLLM as AI provider - #157

Open
al-global-tech wants to merge 1 commit into
CaviraOSS:mainfrom
al-global-tech:add-uberllm-provider
Open

al-global-tech wants to merge 1 commit into
CaviraOSS:mainfrom
al-global-tech:add-uberllm-provider

Conversation

@al-global-tech

Copy link
Copy Markdown

📋 Description

Adds UberLLM as an AI provider, in the same shape as the Runcrate provider (#154). UberLLM has an OpenAI-compatible API at https://api.uberllm.dev/v1 with one key for models from several vendors (DeepSeek, Qwen, OpenAI, Anthropic, Google and others), so the provider is a ChatOpenAI with a different base URL.

  • backend/src/utils/llm/models/uberllm.ts: makeLLM with default model deepseek/deepseek-v3.2; embeddings fall back to the OpenAI settings, as the other chat-only gateways here do.
  • backend/src/utils/llm/models/index.ts: LLM_PROVIDER=uberllm.
  • backend/src/config/env.ts: UBERLLM_API_KEY, UBERLLM_MODEL, UBERLLM_BASE_URL.
  • .env.example and README.md: the new block and the provider list.
  • backend/src/utils/llm/models/__tests__/uberllm.test.ts: defaults, configured model and base URL, temperature and max tokens, embeddings fallback.

Keys: https://uberllm.dev/signup (prepaid, no monthly fee). Model ids and current prices: https://uberllm.dev/models. The catalog at https://api.uberllm.dev/v1/models needs no key.

🔄 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Style/UI changes
  • ♻️ Code refactoring
  • ⚡ Performance improvements
  • 🧪 Test updates
  • 🔧 Build/CI changes

🧪 Testing

  • I have tested this change locally

  • I have added tests that prove my fix is effective or that my feature works

  • New and existing unit tests pass locally with my changes

  • npm run build (tsc -p backend/tsconfig.json): no errors.

  • npx vitest run backend/src/utils/llm: 13 files passed, 1 skipped; 78 tests passed, 3 skipped (the new uberllm.test.ts has 4 tests).

  • npm ci fails on main because package-lock.json is out of sync with package.json, so dependencies were installed with npm install and the lock file change was discarded.

Live check through the built backend: makeModels() from backend/dist/src/utils/llm/models/index.js with LLM_PROVIDER=uberllm and a real UBERLLM_API_KEY, then llm.invoke([{ role: 'user', content: 'Reply with the single word: pong' }]):

  • deepseek/deepseek-v3.2: pong
  • qwen/qwen3-235b-a22b-2507: pong
  • openai/gpt-4o-mini: Pong

📱 Screenshots (if applicable)

N/A, backend provider only.

🔍 Code Review Checklist

  • Code follows the project's coding standards
  • Self-review of the code has been performed
  • Code is properly commented, particularly in hard-to-understand areas
  • Changes generate no new warnings
  • Any dependent changes have been merged and published

📚 Related Issues

None.

🚀 Deployment Notes

None. The provider is only used when LLM_PROVIDER=uberllm.

📋 Additional Context

Disclosure: I work on UberLLM.

🤖 Generated with Claude Code

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.

1 participant