Skip to content

feat(providers): add Requesty gateway provider - #185

Open
Thibaultjaigu wants to merge 1 commit into
SAIL-Research-Lab:mainfrom
Thibaultjaigu:add-requesty-provider
Open

Thibaultjaigu wants to merge 1 commit into
SAIL-Research-Lab:mainfrom
Thibaultjaigu:add-requesty-provider

Conversation

@Thibaultjaigu

Copy link
Copy Markdown

Summary

Adds Requesty as a built-in provider, set up the same way as the OpenRouter entry from #179. Requesty is an OpenAI-compatible LLM gateway (700+ models, one key) at https://router.requesty.ai/v1.

Changes

  • cheetahclaws/providers.py: new requesty entry in PROVIDERS next to openrouter (type openai, REQUESTY_API_KEY, max_completion_tokens cap, curated model list for the /model Tab picker), plus the module docstring. No new request logic. Everything after requesty/ goes out as the model ID, so the existing _provider_name, lookup_model_key and context window handling apply as is.
  • Model IDs can be catalog paths (requesty/openai/gpt-4o-mini) or managed policy IDs with no vendor prefix (requesty/claude-sonnet-4-6). IDs ending in @eu route through EU providers only. The suffix belongs to the model ID and is not parsed like OpenRouter's @provider.
  • cheetahclaws/commands/config_cmd.py: one /model example line.
  • tests/test_requesty_provider.py: entry, prefix stripping, dispatch to the Requesty base URL, key from config and env, no DeepSeek-only fields on requesty/deepseek-v4-flash, max_tokens instead of max_completion_tokens, pricing and context window lookups, prompt overlay with @eu.
  • Docs: README (provider list, table, gateway note, key pages, examples), docs/guides/usage.md (new Requesty section), reference.md, recipes.md, architecture.md, and the table row plus gateway note in the seven i18n READMEs. I left docs/news.md alone since release notes look maintainer written.

How to test

export REQUESTY_API_KEY=rqsty-...     # or /config requesty_api_key=...
cheetahclaws --model requesty/openai/gpt-4o-mini

Validation

  • python -m pytest tests/test_requesty_provider.py tests/test_openrouter_provider.py tests/test_model_completion.py: 45 passed.
  • Full suite on Python 3.12 (macOS): 2857 passed, 25 skipped, 3 failed. The 3 failures (test_kernel_sandbox::test_rlimit_as_kills_runaway_alloc, test_skill_nested::test_nested_SKILL_uppercase, test_vscode_setup::test_local_target_is_user_settings_when_the_editor_dir_exists) fail the same way on clean main on this machine and look macOS specific.
  • Live run through providers.stream() with a real key: requesty/openai/gpt-4o-mini, requesty/claude-sonnet-4-6, requesty/gpt-5.4-mini, requesty/deepseek-v4-flash and requesty/gpt-5-mini@eu all streamed a reply, and a tool call came back as get_time. A direct call returned HTTP 200 with model gpt-4o-mini-2024-07-18.
  • Every hardcoded model ID was checked against GET /v1/models and GET /v1/models/managed.

Disclosure: I work at Requesty. Happy to adjust anything to match project conventions.

Add a requesty entry next to openrouter in PROVIDERS. It uses the
OpenAI-compatible endpoint at https://router.requesty.ai/v1 with the key
from REQUESTY_API_KEY or /config requesty_api_key. Everything after
requesty/ is passed through as the model ID, so both catalog paths
(requesty/openai/gpt-4o-mini) and managed policy IDs
(requesty/claude-sonnet-4-6, requesty/gpt-5-mini@eu) work.

The curated /model list is seeded from the managed policy catalog.
Docs, i18n READMEs and a test file mirror the OpenRouter coverage.
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