Add Requesty as an OpenAI-compatible LLM provider - #38
Merged
Conversation
Mirror the existing OpenRouter provider to add Requesty (https://router.requesty.ai/v1), an OpenAI-compatible LLM router. Adds the requesty ProviderType with its default endpoint, includes it in the OpenAI-compatible code path, and documents it in the config reference. Signed-off-by: Thibault Jaigu <thibault.jaigu@gmail.com>
审阅者指南(在小型 PR 上折叠)审阅者指南通过将 Requesty 接入到提供者枚举、默认端点、校验逻辑、工厂路由、配置 schema 以及文档,新增一个与 OpenAI 兼容的 LLM 提供者 Requesty,其行为与现有的 OpenRouter 集成保持一致。 文件级变更
技巧与命令与 Sourcery 交互
自定义你的使用体验访问你的 dashboard 以:
获取帮助Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's GuideAdds Requesty as a new OpenAI-compatible LLM provider, mirroring the existing OpenRouter integration, by wiring it into provider enums, default endpoints, validation, factory routing, configuration schema, and docs. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - 我在这里给出了一些总体反馈:
- 提供者(provider)列表在
pkg/llm/llm.go、pkg/config/config.go和文档中被重复定义;建议将允许的 provider 值集中管理(例如通过共享常量或辅助函数),以避免在新增或重命名 provider 时出现偏差。 - 在
llm.go中,如果将switch分支和defaultEndpoints映射中的条目按一致的顺序(例如字母顺序)排列,包括新加入的requesty项,可能会更便于浏览。
给 AI 代理的提示
Please address the comments from this code review:
## Overall Comments
- The provider lists are duplicated across `pkg/llm/llm.go`, `pkg/config/config.go`, and the docs; consider centralizing the allowed provider values (e.g., via a shared constant or helper) to avoid future drift when adding or renaming providers.
- In `llm.go`, the `switch` cases and `defaultEndpoints` map entries might be easier to scan if provider constants are kept in a consistent (e.g., alphabetical) order, including the new `requesty` entry.帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进后续评审。
Original comment in English
Hey - I've left some high level feedback:
- The provider lists are duplicated across
pkg/llm/llm.go,pkg/config/config.go, and the docs; consider centralizing the allowed provider values (e.g., via a shared constant or helper) to avoid future drift when adding or renaming providers. - In
llm.go, theswitchcases anddefaultEndpointsmap entries might be easier to scan if provider constants are kept in a consistent (e.g., alphabetical) order, including the newrequestyentry.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The provider lists are duplicated across `pkg/llm/llm.go`, `pkg/config/config.go`, and the docs; consider centralizing the allowed provider values (e.g., via a shared constant or helper) to avoid future drift when adding or renaming providers.
- In `llm.go`, the `switch` cases and `defaultEndpoints` map entries might be easier to scan if provider constants are kept in a consistent (e.g., alphabetical) order, including the new `requesty` entry.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds Requesty as a provider, mirroring the existing OpenRouter provider.
Requesty (
https://router.requesty.ai/v1) is an OpenAI-compatible LLM router, and zenfeed already routes OpenRouter/OpenAI/DeepSeek/Volc/SiliconFlow through the same OpenAI-compatible code path, so this is a small addition:Changes (
pkg/llm/llm.go):ProviderTypeRequestyconstanthttps://router.requesty.ai/v1Plus
pkg/config/config.goanddocs/config.md/docs/config-zh.mdto document the new provider value.Model naming is
provider/model(e.g.openai/gpt-4o-mini,google/gemini-2.5-flash).Verified:
go build ./...,go vet ./pkg/llm/ ./pkg/config/,go test ./pkg/llm/all pass.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.
Summary by Sourcery
将 Requesty 添加为新的、兼容 OpenAI 的 LLM 提供商,并通过现有的 OpenAI 风格代码路径进行路由。
New Features:
Enhancements:
Documentation:
llms[].provider选项。Original summary in English
Summary by Sourcery
Add Requesty as a new OpenAI-compatible LLM provider and route it through the existing OpenAI-style code path.
New Features:
Enhancements:
Documentation:
llms[].provideroption in both English and Chinese configuration docs.