feat: add Requesty as an OpenAI-compatible provider#6273
Conversation
There was a problem hiding this comment.
Summary: This PR adds Requesty as an OpenAI-compatible LLM provider with API key configuration sourced from environment variables and model prefix routing.
Risk: Medium risk. It introduces a new external LLM gateway that may receive prompts and outputs when explicitly configured, but no exploitable authentication, authorization, injection, SSRF, secret-handling, or supply-chain vulnerabilities were identified in the added code.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughRequesty is added as a new OpenAI-compatible LLM provider. The provider is registered in ChangesRequesty Provider Integration
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/edge/en/concepts/llms.mdx`:
- Around line 1272-1281: Fix the malformed code fence formatting for the TOML
example by properly opening the code block with triple backticks before "toml
Code", then in the Python code block add the missing import statement for os at
the beginning, and replace the undefined variable reference REQUESTY_API_KEY
with os.getenv("REQUESTY_API_KEY") to ensure the code is valid Python that can
be properly copy-pasted by users.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 18ba2349-ebfc-4569-802a-e87d26e191b5
📒 Files selected for processing (5)
.env.testdocs/edge/en/concepts/llms.mdxlib/crewai/src/crewai/llm.pylib/crewai/src/crewai/llms/providers/openai_compatible/completion.pylib/crewai/tests/llms/openai_compatible/test_openai_compatible.py
Adds Requesty (an OpenAI-compatible LLM gateway) as a supported provider, mirroring the existing OpenRouter routing.
Requesty uses the same
provider/modelnaming as OpenRouter (e.g.requesty/openai/gpt-4o-mini), so it routes through the existing OpenAI-compatible path rather than needing litellm-native support.requestyis registered inllm.py(supported-providers list, prefix map, the pattern-match passthrough branch, and the openai_compatible provider set) and gets aProviderConfigin the openai_compatible completion module (base_urlhttps://router.requesty.ai/v1,REQUESTY_API_KEY). A model string likerequesty/openai/gpt-4o-minihas itsrequesty/prefix stripped before the upstream call — identical mechanics to openrouter.Changes:
lib/crewai/src/crewai/llm.py— addrequestyto SUPPORTED_NATIVE_PROVIDERS, the provider mapping, the pattern-match branch, and the openai_compatible provider set.lib/crewai/src/crewai/llms/providers/openai_compatible/completion.py— add the Requesty ProviderConfig.lib/crewai/tests/llms/openai_compatible/test_openai_compatible.py— add config + factory-routing tests mirroring the OpenRouter cases.docs/edge/en/concepts/llms.mdx— Requesty accordion mirroring OpenRouter, linking requesty.ai / docs.requesty.ai / app.requesty.ai/router/list..env.test— add REQUESTY_API_KEY placeholder.Verification:
uv run ruff checkclean on changed files;uv run pytest tests/llms/openai_compatible/test_openai_compatible.py→ 37 passed (including the 2 new requesty tests). A live call tohttps://router.requesty.ai/v1/chat/completionswithmodel: openai/gpt-4o-minireturned HTTP 200 with a completion.Disclosure: I work at Requesty. This mirrors the existing OpenRouter provider routing; happy to adjust wording/placement or close if it's not a fit.
Summary by CodeRabbit
New Features
requesty/...model strings.Documentation
REQUESTY_API_KEY, example model usage, and base URL (https://router.requesty.ai/v1).Tests
requesty/...models.