Skip to content

feat: add Runcrate provider - #1206

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

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

Conversation

@heydryft

@heydryft heydryft commented Nov 1, 2026

Copy link
Copy Markdown

Summary

  • Registers Runcrate (inference for open-weight models through an OpenAI-compatible API) as an optional provider in agentbook/providers/registry.py, next to the other direct OpenAI-compatible backends: base URL https://api.runcrate.ai/v1, key RUNCRATE_API_KEY, endpoint override RUNCRATE_BASE_URL, default model deepseek-ai/DeepSeek-V4.1-Flash.
  • Model ids are passed through unchanged (namespaces_models stays off), because Runcrate already uses organization-prefixed ids such as zai-org/GLM-5.3 or Qwen/Qwen3.5-397B-A17B, the same way SiliconFlow does.
  • Documents the key and base URL in .env.example and adds a row to the Chinese and English API-key tables (README.md, docs/en/README.md).
  • Since chapter CLIs build --provider from SUPPORTED_PROVIDERS, --provider runcrate becomes selectable with no other change.

Testing

  • uv run --extra dev python -m pytest tests/test_providers.py -q: 83 passed (new: direct resolution with RUNCRATE_API_KEY, model ids kept as given, RUNCRATE_BASE_URL override, runcrate in SUPPORTED_PROVIDERS; both Runcrate variables added to the cleared PROVIDER_KEY_VARS).
  • uv run --extra dev python -m pytest tests -q --ignore tests/test_site_edit_urls.py: 733 passed, 16 skipped, 1 failed. The failure is tests/test_core_clean_site_links.py::test_linked_json_files_finds_script_and_iframe_linked_jsons, which fails the same way on main without this change; tests/test_site_edit_urls.py needs mkdocs, which the dev extra does not install.
  • uv run --extra dev ruff check agentbook/providers/registry.py tests/test_providers.py: all checks passed. (ruff format --check already reports tests/test_providers.py on main; the added tests do not change that.)
  • Live call: resolve_backend("runcrate") with only RUNCRATE_API_KEY set, then the openai client with the returned base URL and default model, a chat completion with one function tool: finish_reason: tool_calls, calling get_weather with {"city": "Paris"}.

This PR was prepared with AI assistance (omp with Claude): the registry entry, tests, README rows and this description were written with it, and the commands and live call above were run as described.

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