Skip to content

feat(ai): add Requesty as an OpenAI-compatible provider - #83

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

Thibaultjaigu wants to merge 1 commit into
Vrun-design:mainfrom
Thibaultjaigu:add-requesty-provider

Conversation

@Thibaultjaigu

Copy link
Copy Markdown

Summary

Adds Requesty as a BYOK AI provider. It is an OpenAI-compatible LLM gateway (base URL https://router.requesty.ai/v1), so it reuses the existing callOpenAICompatible path. Every place OpenRouter is registered got a Requesty sibling; no shared client code changed.

Changes

  • src/store/types.ts, src/store/aiSettings.ts, src/store/aiSettingsSchemas.ts: requesty added to the AIProvider union, AI_PROVIDERS and the zod enum
  • src/config/aiProviders.ts: base URL, default model (openai/gpt-4o-mini), provider meta (key link https://app.requesty.ai/api-keys), model list, default base URL, risk browser_friendly (the router answers CORS preflight with access-control-allow-origin: *)
  • src/services/aiService.ts: VITE_REQUESTY_API_KEY env fallback
  • src/components/SettingsModal/ai/AdvancedEndpointSection.tsx: same POST /chat/completions hint OpenRouter shows
  • public/logos/requesty.svg: monochrome logo in the same format as openrouter.svg (works with the mask-image icon)
  • _headers, nginx/nginx.conf: https://*.requesty.ai added to connect-src next to https://openrouter.ai
  • src/i18n/locales/en and public/locales/en: English provider hint and model labels (other locales fall back to English), kept in sync
  • README provider table and counts, docs-site AI generation page (en, tr)

Requesty is not the default provider and is not added to any automatic selection.

Model list: openai/gpt-4o-mini plus four Requesty managed policies (gpt-5.4-mini, claude-sonnet-4-6, gemini-3.5-flash, deepseek-v4-flash). Managed policy ids are short names that route across several upstream providers with failover. All ids checked against the live GET /v1/models and GET /v1/models/managed.

How to test

  1. Set VITE_REQUESTY_API_KEY=<your key> in .env.local, or pick Requesty in Settings, AI and paste a key
  2. Keep the default model openai/gpt-4o-mini (or pick another from the list)
  3. Generate a diagram in Flowpilot

Validation

  • npx tsc -b: pass
  • npx eslint on the touched TS files with --max-warnings 0: pass
  • npx vitest --run: 296 files, 1465 tests passed (includes the provider config consistency and locale coverage/sync tests)
  • Live check through aiService (throwaway vitest file, not committed): chatWithFlowpilot with provider requesty streamed a reply from openai/gpt-4o-mini, and generateDiagramFromChat returned DSL for all five listed models

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

Registers Requesty next to OpenRouter: provider type and schemas, base URL, default model, model list, env key, logo, CSP connect-src, English strings and docs.

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