Skip to content

feat(ai): add Runcrate as an AI provider - #1336

Open
heydryft wants to merge 1 commit into
TabularisDB:mainfrom
heydryft:feat/runcrate-provider
Open

heydryft wants to merge 1 commit into
TabularisDB:mainfrom
heydryft:feat/runcrate-provider

Conversation

@heydryft

Copy link
Copy Markdown

Summary

Adds Runcrate as an AI provider. Runcrate serves open models (DeepSeek, GLM, Qwen, Kimi, gpt-oss and others) behind an OpenAI-compatible Chat Completions API at https://api.runcrate.ai/v1. It follows the Requesty integration (#817) step by step, so it shows up in Settings > AI next to OpenRouter and Requesty and works for SQL generation, query explanation and the other AI features.

Changes

  • src-tauri/src/ai.rs: generate_runcrate (POST https://api.runcrate.ai/v1/chat/completions, same body as OpenRouter and Requesty, no attribution headers), the dispatch arm, and fetch_runcrate_models, which reads the public /v1/models catalog and keeps only rows whose output_modalities include text (the same list also has image, video, audio and embedding models). Merged into the static list like OpenRouter and Requesty.
  • src-tauri/src/ai_models.yaml: runcrate entry with deepseek-ai/DeepSeek-V4.1-Flash first as the default, then zai-org/GLM-5.3-Flash, zai-org/GLM-5.3, Qwen/Qwen3.8-Flash, openai/gpt-oss-120b, moonshotai/Kimi-K2.6. All ids checked against the live catalog.
  • src-tauri/src/application/ai.rs, src-tauri/src/transport/desktop/config.rs: RUNCRATE_API_KEY env var for key lookup and key status.
  • packages/web-ui: provider type, label, Settings > AI entry, key status check and a simple box icon in ClientIcons.tsx (currentColor, no hardcoded colors).
  • Runcrate is left out of the automatic provider detection in settings.ts and aiDefaults.ts, like Requesty, so it is only used when picked explicitly. A test covers that.
  • Tests: test_runcrate_catalog_keeps_text_models_only and a runcrate check in test_load_default_models; runcrate added to both provider fixture tests in ai_provider_tests.rs (wire protocol plus a check that the request goes to api.runcrate.ai:443 as POST /v1/chat/completions, and HTTP error propagation); label test in settingsUI.test.ts; no auto-select test in settings.test.ts.
  • README.md, .gitster/gitster.md, snap/snapcraft.yaml: Runcrate added to the provider lists.

No issue to close: this is a provider addition with the same scope as #817.

How to test

  1. Get a key at https://www.runcrate.ai/dashboard/api-keys?utm_source=tabularis&utm_medium=directory&utm_campaign=gpu_pricing and either save it in Settings > AI > Runcrate or export RUNCRATE_API_KEY.
  2. Pick Runcrate and the model deepseek-ai/DeepSeek-V4.1-Flash (or refresh the model list to see the full catalog).
  3. Generate a query from natural language or explain a query.

Checks

  • pnpm typecheck: pass
  • pnpm lint (ESLint, Prettier, theme tokens): pass
  • npx vitest run in packages/web-ui: 7525 passed, 7 failed. The 7 failing files (index.test.ts, api/representativeSlice.test.ts, contexts/ThemeDowngrade.test.tsx, scripts/set-nightly-version.test.ts, scripts/stage-winget-installer.test.ts, scripts/winget-build-config.test.ts, types/pluginSlotsParity.test.ts) fail the same way on a clean main in this checkout, unrelated to this change. The new and touched tests in settings.test.ts and settingsUI.test.ts pass.
  • cargo test --lib ai in src-tauri: 323 passed, 0 failed, 3 ignored, including test_runcrate_catalog_keeps_text_models_only, test_load_default_models and both ai::provider_tests fixture tests.
  • rustfmt --check on the changed Rust files: clean.
  • Live run through generate_runcrate and fetch_runcrate_models with a Runcrate key (a temporary ignored test, not committed):
    • fetch_runcrate_models: 146 text models
    • deepseek-ai/DeepSeek-V4.1-Flash and zai-org/GLM-5.3-Flash, prompt "Count the rows in the authors table": both returned SELECT COUNT(*) FROM authors;
    • an invalid key: Runcrate Error: {"error":{"message":"Invalid or revoked API key",...}}

This PR was prepared with AI assistance: an AI coding agent wrote the change and ran the checks above.

Disclosure: I work on Runcrate.

@kilo-code-bot

kilo-code-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (14 files)
  • .gitster/gitster.md
  • README.md
  • packages/web-ui/src/components/icons/ClientIcons.tsx
  • packages/web-ui/src/components/settings/AiTab.tsx
  • packages/web-ui/src/contexts/SettingsContext.ts
  • packages/web-ui/src/utils/settingsUI.ts
  • packages/web-ui/tests/utils/settings.test.ts
  • packages/web-ui/tests/utils/settingsUI.test.ts
  • snap/snapcraft.yaml
  • src-tauri/src/ai.rs
  • src-tauri/src/ai_models.yaml
  • src-tauri/src/ai_provider_tests.rs
  • src-tauri/src/application/ai.rs
  • src-tauri/src/transport/desktop/config.rs

Reviewed by claude-sonnet-5.5 · Input: 258 · Output: 1.6K · Cached: 232.1K

Review guidance: REVIEW.md from base branch main

@debba debba left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work on adding Runcrate, including filtering its model catalog to text outputs. We are evaluating moving AI assistant integrations into plugins, so I am holding off on reviewing and merging AI assistant changes for now. The draft with that work is #1337.

Since this is your first PR here, we would be happy to have you join us on Discord if you would like to get involved: https://discord.com/invite/K2hmhfHRSt

@heydryft

Copy link
Copy Markdown
Author

Thanks for the look, understood. Happy to wait. Once the plugin interface from #1337 lands I'll port the Runcrate entry to the plugin API. Could you ping me here when it's ready?

@NewtTheWolf

Copy link
Copy Markdown
Collaborator

@heydryft, the interface you were waiting for is now on main: #1337 has been merged. Runcrate can now be a separate declarative ai-assistant package instead of another provider-specific Rust/UI branch.

The authoring guide is https://github.com/TabularisDB/tabularis/blob/main/plugins/ai-assistants/README.md and a starting definition is at https://github.com/TabularisDB/tabularis/blob/main/plugins/ai-assistants/packages/runcrate/.tabularium . Keep the stable runcrate identity and publish the standalone manifest plus universal ZIP from its provider repository; the host owns credentials, proxy routing, templates and model-cache behavior.

The existing eight providers remain embedded, so replacement packages for them are unnecessary. The production AI kind/listing has not been enabled, and the actual first shipping runtime version still needs assignment before public ingestion. Please develop the package against main now, then coordinate that runtime gate rather than publishing an unversioned production listing. This resolves the wait for an interface; it is not an approval to merge the old hardcoded-provider implementation.

@heydryft

Copy link
Copy Markdown
Author

Great, thanks. We'll build Runcrate as an ai-assistant package against main and publish it from a Runcrate repo. Will wait on the runtime version before anything public.

@debba

debba commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

@heydryft, the runtime-version gate you were waiting for is now assigned.

The external AI assistant runtime from #1337 is now on main, and the production Tabularium registry now accepts ai-assistant packages. The runtime version to declare for the next nightly, expected on November 13, 2026, is:

"min_runtime_version": "0.32.1-4"

The current nightly is 0.32.1-3; 0.32.1-4 has not shipped yet. A package can be published now with this floor and used once that nightly (or a newer compatible runtime) is installed.

For a complete published example, see Google Gemini on Tabularium, the Gemini plugin repository, and release 1.0.2. The release includes the standalone .tabularium manifest and a universal ZIP; both declare the same plugin version and runtime floor. Gemini is approved and indexed with hashes and signed integrity metadata, and its repository webhook is active.

The authoring guide describes the declarative HTTP contract. New providers should use an external ai-assistant package, with credentials, requests and model discovery managed by the host.

The Runcrate starter manifest is available as a starting point. Keep id: "runcrate" and set the runtime floor above in your published package.

@heydryft

Copy link
Copy Markdown
Author

The package is up: https://github.com/runcrateai/tabularis-runcrate-plugin/releases/tag/v1.0.0 (standalone manifest plus universal ZIP, floor 0.32.1-4). One snag on the registry side: the GitHub sign-in asks for repo write and webhook admin on the account, which is more than we want to hand over. Could you add the repo from your end, or is there a narrower way in?

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.

3 participants