Skip to content

Add Requesty as an OpenAI-compatible LLM provider - #38

Merged
glidea merged 1 commit into
glidea:mainfrom
Thibaultjaigu:add-requesty-provider
Jul 3, 2026
Merged

Add Requesty as an OpenAI-compatible LLM provider#38
glidea merged 1 commit into
glidea:mainfrom
Thibaultjaigu:add-requesty-provider

Conversation

@Thibaultjaigu

@Thibaultjaigu Thibaultjaigu commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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):

  • add ProviderTypeRequesty constant
  • add its default endpoint https://router.requesty.ai/v1
  • include it in the provider validation list and the OpenAI-compatible code-path group

Plus pkg/config/config.go and docs/config.md/docs/config-zh.md to 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:

  • 引入 Requesty LLM 提供商,包含一个默认端点,并在提供商校验和工厂创建流程中加入支持。

Enhancements:

  • 扩展配置模式(schema)说明,将 Requesty 提供商与现有的 LLM 提供商一同纳入描述。

Documentation:

  • 在英文和中文的配置文档中,将 Requesty 记录为有效的 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:

  • Introduce a Requesty LLM provider with a default endpoint and support in provider validation and factory creation.

Enhancements:

  • Extend configuration schema descriptions to include the Requesty provider alongside existing LLM providers.

Documentation:

  • Document Requesty as a valid llms[].provider option in both English and Chinese configuration docs.

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>
@sourcery-ai

sourcery-ai Bot commented Jul 1, 2026

Copy link
Copy Markdown
审阅者指南(在小型 PR 上折叠)

审阅者指南

通过将 Requesty 接入到提供者枚举、默认端点、校验逻辑、工厂路由、配置 schema 以及文档,新增一个与 OpenAI 兼容的 LLM 提供者 Requesty,其行为与现有的 OpenRouter 集成保持一致。

文件级变更

Change Details Files
Introduce Requesty as a supported LLM provider and wire it into the OpenAI-compatible code path.
  • Add ProviderTypeRequesty enum value to the provider type definition.
  • Register Requesty in the defaultEndpoints map with its router URL.
  • Allow Requesty in provider validation logic for LLM config.
  • Route Requesty through the same OpenAI-compatible LLM factory branch as OpenAI/OpenRouter/DeepSeek/Volc/SiliconFlow.
pkg/llm/llm.go
Expose Requesty as a valid provider option in user-facing configuration and documentation.
  • Update LLM provider field description in the config struct to list requesty as an allowed value.
  • Update English configuration docs to include requesty in the list of valid provider strings.
  • Update Chinese configuration docs to include requesty in the list of valid provider strings.
pkg/config/config.go
docs/config.md
docs/config-zh.md

技巧与命令

与 Sourcery 交互

  • 触发新审阅: 在 pull request 中评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审阅评论。
  • 从审阅评论生成 GitHub issue: 通过回复某条审阅评论,让 Sourcery 从该评论创建一个 issue。你也可以在审阅评论下回复 @sourcery-ai issue 来从中创建 issue。
  • 生成 pull request 标题: 在 pull request 标题的任意位置写上 @sourcery-ai,即可随时生成一个标题。你也可以在 pull request 中评论 @sourcery-ai title 以在任何时间(重新)生成标题。
  • 生成 pull request 摘要: 在 pull request 正文的任意位置写上 @sourcery-ai summary,即可在你想要的确切位置随时生成 PR 摘要。你也可以在 pull request 中评论 @sourcery-ai summary 以在任何时间(重新)生成摘要。
  • 生成审阅者指南: 在 pull request 中评论 @sourcery-ai guide,即可在任何时间(重新)生成审阅者指南。
  • 解决所有 Sourcery 评论: 在 pull request 中评论 @sourcery-ai resolve 来解决所有 Sourcery 评论。如果你已经处理完所有评论且不想再看到它们,这会非常有用。
  • 撤销所有 Sourcery 审阅: 在 pull request 中评论 @sourcery-ai dismiss 来撤销所有现有的 Sourcery 审阅。如果你想以一次全新的审阅重新开始,这尤其有用——别忘了再评论 @sourcery-ai review 来触发新的审阅!

自定义你的使用体验

访问你的 dashboard 以:

  • 启用或禁用审阅功能,例如 Sourcery 生成的 pull request 摘要、审阅者指南等。
  • 更改审阅语言。
  • 添加、删除或编辑自定义审阅说明。
  • 调整其他审阅设置。

获取帮助

Original review guide in English
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds 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

Change Details Files
Introduce Requesty as a supported LLM provider and wire it into the OpenAI-compatible code path.
  • Add ProviderTypeRequesty enum value to the provider type definition.
  • Register Requesty in the defaultEndpoints map with its router URL.
  • Allow Requesty in provider validation logic for LLM config.
  • Route Requesty through the same OpenAI-compatible LLM factory branch as OpenAI/OpenRouter/DeepSeek/Volc/SiliconFlow.
pkg/llm/llm.go
Expose Requesty as a valid provider option in user-facing configuration and documentation.
  • Update LLM provider field description in the config struct to list requesty as an allowed value.
  • Update English configuration docs to include requesty in the list of valid provider strings.
  • Update Chinese configuration docs to include requesty in the list of valid provider strings.
pkg/config/config.go
docs/config.md
docs/config-zh.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - 我在这里给出了一些总体反馈:

  • 提供者(provider)列表在 pkg/llm/llm.gopkg/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.

Sourcery 对开源项目是免费的——如果你觉得我们的评审有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进后续评审。
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, 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.
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.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

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.

@glidea
glidea merged commit 5f0c671 into glidea:main Jul 3, 2026
3 checks passed
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.

2 participants