Skip to content

feat: add Requesty as an OpenAI-compatible provider#127

Open
Thibaultjaigu wants to merge 1 commit into
aristoteleo:mainfrom
Thibaultjaigu:add-requesty-provider
Open

feat: add Requesty as an OpenAI-compatible provider#127
Thibaultjaigu wants to merge 1 commit into
aristoteleo:mainfrom
Thibaultjaigu:add-requesty-provider

Conversation

@Thibaultjaigu

Copy link
Copy Markdown

Add Requesty as an OpenAI-compatible provider

This adds Requesty as a first-class provider, mirroring the existing OpenRouter integration. Requesty is an OpenAI-compatible LLM gateway: it speaks the standard Chat Completions API, uses provider/model naming, and routes to the same upstream model providers.

Provider shape

  • SDK: openai (openai_compatible: true)
  • Base URL: https://router.requesty.ai/v1
  • Auth: REQUESTY_API_KEY (sent as Authorization: Bearer <key>)
  • Model naming: provider/model (e.g. openai/gpt-4o-mini, anthropic/claude-sonnet-4-5)
  • Output token param: max_tokens

Wiring sites (mirrors OpenRouter exactly)

  • pantheon/repl/setup_wizard.py — new ProviderMenuEntry("requesty", "Requesty", "REQUESTY_API_KEY", "REQUESTY_API_BASE") in PROVIDER_MENU, right after OpenRouter (same arg order: id, display, api_key_env, api_base_env).
  • pantheon/utils/llm_catalog.json — new sibling "requesty" provider block matching the OpenRouter field shape (display_name, sdk, base_url, api_key_env, openai_compatible, chat_output_token_param, models). Catalog-driven resolution in llm_providers.detect_provider / provider_registry picks this up with no per-provider branching. Includes a small set of known-live Requesty models: openai/gpt-4o-mini, openai/gpt-4o, anthropic/claude-sonnet-4-5, deepseek/deepseek-chat, google/gemini-2.5-flash.
  • pantheon/utils/vision_capability.py — added "requesty" to _KNOWN_CHAT_COMPLETIONS_ONLY alongside openrouter (gateway proxies Chat Completions, so tool-result images fall back to the sub-agent path, conservatively matching OpenRouter behaviour).
  • pantheon/utils/model_selector.py — added requesty to DEFAULT_PROVIDER_PRIORITY, a requesty entry in DEFAULT_PROVIDER_MODELS (high/normal/low quality chains), and "requesty": "REQUESTY_API_KEY" in PROVIDER_API_KEYS.

Verification

  • JSON validated: python3 -c "import json; json.load(open('pantheon/utils/llm_catalog.json'))" passes; requesty present with all 5 models.
  • AST parse of every edited .py (setup_wizard.py, vision_capability.py, model_selector.py) passes.
  • Smoke import: from pantheon.utils.model_selector import DEFAULT_PROVIDER_MODELS, PROVIDER_API_KEYS resolves requesty correctly.
  • Ran tests/test_model_selector.py tests/test_setup_wizard.py tests/test_llm_provider_config.py tests/test_provider_adapters.py: same pass/fail counts as the unmodified baseline (pre-existing failures are unrelated environment/test-drift; this change introduces no new failures and adds passing provider-parametrized cases).
  • Live chat completion against https://router.requesty.ai/v1/chat/completions with openai/gpt-4o-mini, max_tokens: 16 → HTTP 200, real completion returned (gpt-4o-mini-2024-07-18).

Links

I work at Requesty. This mirrors the existing OpenRouter provider as closely as possible. Happy to adjust or close it if it's not a fit.

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