Skip to content

Add Runcrate provider - #39

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

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

Conversation

@heydryft

@heydryft heydryft commented Nov 8, 2026

Copy link
Copy Markdown

Hi, thanks for building OpenHack; this adds Runcrate to the bring-your-own-key provider list next to DeepInfra, Cerebras and the others.

Summary

Adds a runcrate entry to the provider registry in openhack/providers.py. Runcrate is an AI cloud with an OpenAI-compatible inference API for open-weight models, so it uses the same code path as the other OpenAI-compatible providers: base URL https://api.runcrate.ai/v1, key from RUNCRATE_API_KEY (or a saved credential), default model Qwen/Qwen3-235B-A22B-Instruct-2507, which is in the public model list at https://api.runcrate.ai/v1/models and advertises tool calling there. It is a long-tail entry like deepinfra, so the curated picker list is unchanged.

Changes

  • openhack/providers.py: the runcrate ProviderSpec.
  • tests/test_providers.py: resolve("runcrate") returns the base URL, key from the environment and the default model, and reports RUNCRATE_API_KEY as the missing key when it is unset.

How I tested

In a Python 3.14 venv created with uv venv and uv pip install -e '.[dev]' pytest pytest-asyncio:

  • pytest tests/test_providers.py tests/test_provider_picker.py: 46 passed.
  • pytest (full suite): 513 passed.

I did not make an authenticated chat call; I only checked that the default model id appears in the public /v1/models response.

Disclosure: I work on Runcrate.

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

@greptile-apps

greptile-apps Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change affects users who choose Runcrate for their model calls.

The PR appears safe to merge, with a non-blocking fix to make the new test independent of local overrides.

Fix All in CodexFindings

  1. P2 Local overrides break the test ▶
Fix with agent prompt
### Issue 1
tests/test_providers.py:127-128
If a developer has `RUNCRATE_BASE_URL` or `RUNCRATE_MODEL` set, `resolve()` correctly uses that override, but this test fails because it expects the defaults. Clear both variables with `monkeypatch.delenv(..., raising=False)` before resolving so the test does not depend on the developer’s environment.

```suggestion
    monkeypatch.setenv("RUNCRATE_API_KEY", "rc-test")
    monkeypatch.delenv("RUNCRATE_BASE_URL", raising=False)
    monkeypatch.delenv("RUNCRATE_MODEL", raising=False)
    monkeypatch.setattr(providers, "get_credential", lambda name: None)
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds Runcrate as a bring-your-own-key provider under “Other…”.

  • Runcrate can now be selected as a bring-your-own-key provider.

Reviews (1) · Last reviewed commit: "Add Runcrate provider" · Reviewed by Greptile

Comment thread tests/test_providers.py
Comment on lines +127 to +128
monkeypatch.setenv("RUNCRATE_API_KEY", "rc-test")
monkeypatch.setattr(providers, "get_credential", lambda name: None)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Local overrides break the test

If a developer has RUNCRATE_BASE_URL or RUNCRATE_MODEL set, resolve() correctly uses that override, but this test fails because it expects the defaults. Clear both variables with monkeypatch.delenv(..., raising=False) before resolving so the test does not depend on the developer’s environment.

Suggested change
monkeypatch.setenv("RUNCRATE_API_KEY", "rc-test")
monkeypatch.setattr(providers, "get_credential", lambda name: None)
monkeypatch.setenv("RUNCRATE_API_KEY", "rc-test")
monkeypatch.delenv("RUNCRATE_BASE_URL", raising=False)
monkeypatch.delenv("RUNCRATE_MODEL", raising=False)
monkeypatch.setattr(providers, "get_credential", lambda name: None)
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/test_providers.py
Line: 127-128

Comment:
**Local overrides break the test**

If a developer has `RUNCRATE_BASE_URL` or `RUNCRATE_MODEL` set, `resolve()` correctly uses that override, but this test fails because it expects the defaults. Clear both variables with `monkeypatch.delenv(..., raising=False)` before resolving so the test does not depend on the developer’s environment.

```suggestion
    monkeypatch.setenv("RUNCRATE_API_KEY", "rc-test")
    monkeypatch.delenv("RUNCRATE_BASE_URL", raising=False)
    monkeypatch.delenv("RUNCRATE_MODEL", raising=False)
    monkeypatch.setattr(providers, "get_credential", lambda name: None)
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex Fix in Claude Code Fix in Cursor Fix in Conductor

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