Skip to content

feat(llm): add Requesty provider (OpenAI-compatible unified API) - #140

Open
Thibaultjaigu wants to merge 1 commit into
calesthio:masterfrom
Thibaultjaigu:add-requesty-provider
Open

Thibaultjaigu wants to merge 1 commit into
calesthio:masterfrom
Thibaultjaigu:add-requesty-provider

Conversation

@Thibaultjaigu

@Thibaultjaigu Thibaultjaigu commented Sep 8, 2026

Copy link
Copy Markdown

Problem

Crucix supports one unified-API router (OpenRouter). Users who already route their LLM traffic through Requesty (https://requesty.ai, one OpenAI-compatible key across OpenAI, Anthropic, Google, DeepSeek, etc., with SOC2/GDPR and an EU endpoint) currently can't point the LLM layer at it without editing source.

Change

Adds requesty as a 9th LLM provider, mirroring lib/llm/openrouter.mjs line for line:

  • lib/llm/requesty.mjs: RequestyProvider extends LLMProvider, raw fetch (no SDK) against https://router.requesty.ai/v1/chat/completions, LLM_API_KEY for auth, default model openai/gpt-4o-mini, same HTTP-Referer / X-Title headers, same timeout/usage/error shape.
  • lib/llm/index.mjs: import, export, and case "requesty" in createLLMProvider.
  • README.md, .env.example, crucix.config.mjs: provider lists and default-model table.
  • test/llm-requesty.test.mjs (unit, mocked fetch) and test/llm-requesty-integration.test.mjs (gated on LLM_PROVIDER=requesty + LLM_API_KEY, like the OpenRouter one).

No changes to existing providers or config behaviour; LLM failures still degrade to the rule-based engine.

User-facing impact

LLM_PROVIDER=requesty + LLM_API_KEY=<key> enables AI trade ideas / alert evaluation through Requesty; LLM_MODEL accepts any vendor/model id from its catalog.

Testing

  • node --test test/llm-requesty.test.mjs test/llm-openrouter.test.mjs → 13/13 pass.

  • Integration test run live with a real key (LLM_PROVIDER=requesty) → 2/2 pass.

  • Manual: createLLMProvider({provider:"requesty",...}).complete(...) returned "hello from requesty" from gpt-4o-mini-2024-07-18 with usage populated.

  • I tested the changed path locally

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

Mirrors the OpenRouter provider: raw fetch against
https://router.requesty.ai/v1/chat/completions, LLM_API_KEY for auth,
default model openai/gpt-4o-mini. Wired into createLLMProvider, documented
in README/.env.example, with unit + gated integration tests.

Signed-off-by: Thibault Jaigu <thibault.jaigu@gmail.com>
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