Skip to content

WIP: feat: add OpenLLM provider - #2008

Draft
apewithllm wants to merge 1 commit into
Kiln-AI:mainfrom
openllmsh:openllm-provider
Draft

apewithllm wants to merge 1 commit into
Kiln-AI:mainfrom
openllmsh:openllm-provider

Conversation

@apewithllm

Copy link
Copy Markdown

Description
REPLACE: what this PR is, in 1 to 2 sentences max.

Author Review (required)

  • I have done a code review

Architecture Review (select 1)

  • I did architecture review before coding
  • Small change, no architecture review needed
  • Requesting architecture review exception for other reason: NA

Review Requested from Code Reviewer (select 1)

  • Sign off on AI-only review: [reason - required if selected]
  • Mixed: human review of some areas, AI on others (details below)
  • Full human: human reads everything

Agentic Code Review (must check all before requesting CR)

  • I have run /spec deep cr on this PR or used /spec CRs throughout
  • I have addressed all AI feedback (“deep cr”, CodeRabbit, etc)

What to Review

  • Key decisions to review
    • REPLACE: 1-4 decisions you made.
  • Paths to review
    • REPLACE: List of paths/files to review. example libs/code/adapters/KevAdapter.py

UI Review (select all that apply)

  • Agentic UI clickthrough done
  • Requires UI review as part of this review
  • UI review already done by: person
  • No UI

Contributor License Agreement

I, @, confirm that I have read and agree to the Contributors License Agreement.


Agentic PR Summary

TLDR: Kiln users want to run evals and synthetic data on the models and subscriptions that they already have, so this PR adds OpenLLM as a native provider. Targets main. No companion PRs.

OpenLLM routes the API keys, OAuth subscription accounts, and local models of a user through one endpoint. Before this PR, a user connects OpenLLM only as a custom OpenAI compatible provider. The user must type the base URL and add each model by hand. After this PR, the Connect Providers screen shows an OpenLLM card. Kiln lists the chat models of the user from the OpenLLM gateway.

OpenLLM also supports the full /v1/ API surface and has an MCP server. See the OpenLLM documentation.

Implementation

  • The openllm value is added to ModelProviderName. The display name is "OpenLLM". The structure follows the Cloudflare Workers AI provider (feat: add Cloudflare Workers AI as a model provider #1824).
  • The config has two new settings: openllm_base_url (env OPENLLM_BASE_URL) and openllm_api_key (env OPENLLM_API_KEY, sensitive). The default base URL is the local daemon, http://127.0.0.1:8787/v1. The API key is optional. A user can set the hosted endpoint https://www.openllm.sh/v1 and an sk-llm- key.
  • LiteLLM calls OpenLLM through the openai route with the base URL. When the user sets no key, Kiln sends the placeholder openllm, because LiteLLM needs a key. The local daemon treats that bearer as the saved login.
  • connect_openllm sends an async request to {base_url}/models. It saves the settings only on success. The error messages tell the user to run openllm start, to install OpenLLM, to run openllm login (loopback only), or that the API key is not valid.
  • /api/available_models includes the OpenLLM models. Kiln keeps only the models whose capabilities contain chat. Kiln keeps the model IDs as the gateway gives them, for example claude_code/claude-opus-4-8 or lite. The tools, vision, and json_mode capabilities set the function calling, vision, and structured output flags. All OpenLLM models are untested models, the same as Ollama models.
  • The web UI has a new OpenLLM card with the optional Base URL and API Key fields, and a new logo.
  • api_schema.d.ts is regenerated with generate_schema.sh.

Warning

  • conventions reports core-config-shared at the two new Config.shared() reads in lite_llm_core_config_for_provider. All other providers in that function use the same pattern. This PR does not add them to the allowlist.
  • Each run of an OpenLLM model logs "Unexpected model/provider pair". Ollama untested models log the same warning.

Checks

  • uv run ./checks.sh --agent-mode exits 0 on the committed branch. misspell is not installed on this machine, so that step was skipped.
  • The six changed Python test files: 780 passed, 3 skipped. ruff check, ruff format --check, and ty check pass (3 warnings in g_eval.py and eval.py are also on main).
  • Web: npm run lint, format_check, check (0 errors), and connect_providers.test.ts (20 passed) pass. An earlier full test_run passed 3753 tests and npm run build passed.
  • A live check against a local OpenLLM daemon:
    • Connect with no key and the model list both work. The list has 86 chat models and drops the image and speech models.
    • A completion with model lite works through LiteLlmAdapter.
    • Streaming works, and a tool call returns get_weather {"city":"Paris"}.
    • A bad key gives "Invalid API key".
  • The hosted endpoint is covered only by mocked tests.
  • No /spec deep cr ran. A separate agent review ran, and its findings are fixed: the auth error messages, a comment, a reverted rename, and fewer duplicate tests.

Docs and skills updated: none. No doc in the repo lists providers. The docs-sync skill did not run.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords: 2

  • WIP
  • Draft

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8f24c8d8-6fb4-4d56-8747-422e20e8b1b2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
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