Skip to content

feat(providers): add Runcrate provider - #9808

Open
heydryft wants to merge 2 commits into
simstudioai:stagingfrom
heydryft:feat/runcrate-provider
Open

heydryft wants to merge 2 commits into
simstudioai:stagingfrom
heydryft:feat/runcrate-provider

Conversation

@heydryft

@heydryft heydryft commented Nov 9, 2026

Copy link
Copy Markdown

Thanks for building Sim: the shared openai-compat helper and the add-model skill made this a small, clean addition.

Summary

Adds Runcrate as a BYOK model provider for the Agent block. Runcrate is an AI cloud with an OpenAI-compatible inference API at https://api.runcrate.ai/v1, so the new provider goes through the shared openai-compat chat-completions helper, the same way Nebius does.

  • Catalog models are namespaced runcrate/<org>/<model>: DeepSeek V3.2, Gemma 3 27B, Llama 3.3 70B, MiniMax M3, Qwen3 235B, Qwen3 Coder 480B and GLM 5.3. Ids, context windows and per-million-token pricing were taken from GET https://api.runcrate.ai/v1/models.
  • Strict JSON schema response format is sent natively (checked against the live API on three of the models).
  • Forced tool choice is only sent to models that honor it (DeepSeek V3.2, Gemma 3 27B, GLM 5.3). The API answers 400 for a named tool_choice on the others, so those fall back to auto, the same pattern Nebius uses.
  • BYOK wiring: key lookup, settings row, API contract, usage-page icon and a new RuncrateIcon.
  • Attachments are disabled for this provider.
  • Docs: agent.mdx and costs.mdx.

Product update (if relevant)

Workspaces can add their own Runcrate API key and use Runcrate-hosted open models in Agent blocks. On self-hosted Sim, the key goes in the Agent block's API Key field.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

Run from apps/sim unless noted, after bun install --ignore-scripts (the isolated-vm native build failed on my machine, which does not affect these checks):

  • bunx vitest run providers/runcrate providers/utils providers/models providers/attachments providers/history-adapters lib/api-key: 14 files, 359 tests passed (the 9 new providers/runcrate/index.test.ts tests: wire contract and auth header, case-insensitive model resolution, strict JSON schema, forced-tool downgrade for four models, SSE reasoning and usage with catalog pricing, missing key). The new Runcrate cases in lib/api-key/byok.test.ts pass with the rest of that file.
  • bun run type-check (in apps/sim): clean.
  • bunx biome check on the touched files: no findings.
  • From the repo root: bun run check:byok-providers, check:icon-paths, check:bare-icons, check:file-names and check:source-conventions pass.
  • Live API: I sent a handful of small chat requests with a Runcrate key to confirm the tool-choice and JSON schema behavior above. I did not add a live acceptance test or run the app by hand.

Reviewers may want to look at the per-model forcedToolUse flags and the icon, which I drew as a simple SVG of the brand mark.

Disclosure: I work on Runcrate.

This PR was prepared with AI assistance (omp with Claude): the code, tests, docs and this description were written with it, and the commands above were run as part of preparing it.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

@vercel

vercel Bot commented Nov 9, 2026

Copy link
Copy Markdown

@heydryft is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The new request path is limited to workflows that choose Runcrate models.

No behavioral blocker was found, but the new exports must satisfy the repository's TSDoc requirement before merging.

Findings

  1. P2 New exports lack required docs ▶

Summary

Adds Runcrate as a bring-your-own-key provider for Agent blocks.

  • Agent blocks can send requests to seven Runcrate models.
  • Workspace admins can save Runcrate keys for Agent calls.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Agent selects Runcrate model] --> B[Resolve saved or block key]
  B --> C[Runcrate adapter]
  C --> D[Restore catalog model spelling]
  D --> E[Downgrade unsupported forced tool choice]
  E --> F[Shared Chat Completions helper]
  F --> G[Runcrate API]
Loading

Reviews (1) · Last reviewed commit: "feat(providers): add Runcrate provider" · Reviewed by Greptile

return messages
}

export const runcrateProvider: ProviderConfig = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 New exports lack required docs

The new runcrateProvider and RuncrateIcon exports have no TSDoc, which CLAUDE.md requires for exported APIs. Add short comments describing their purpose, including the provider's key requirement and tool-choice fallback, so callers do not have to read the implementation. This repository requirement must be satisfied before merging.

Context Used: CLAUDE.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@heydryft

heydryft commented Nov 9, 2026

Copy link
Copy Markdown
Author

Added TSDoc to runcrateProvider and RuncrateIcon, covering the API key requirement and the tool choice fallback.

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