Skip to content

feat(channel): add Requesty channel - #628

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

feat(channel): add Requesty channel#628
Thibaultjaigu wants to merge 1 commit into
tbphp:mainfrom
Thibaultjaigu:add-requesty-provider

Conversation

@Thibaultjaigu

Copy link
Copy Markdown

关联 Issue / Related Issue

None.

变更内容 / Change Content

  • 新功能 / New feature

Adds Requesty (https://router.requesty.ai/v1) as a built in channel preset next to OpenRouter. Requesty is an OpenAI compatible router in front of 700+ models addressed as vendor/model, for example openai/gpt-4o-mini, plus curated managed routing policies with short ids such as claude-sonnet-4-5.

Changes:

  • New internal/channel/modules/requesty.go on the OpenAICompatible provider kind with EndpointFixedWithOverride (the same pattern as the SiliconFlow, Moonshot and Zhipu presets, since Bifrost ships no Requesty provider). CatalogProviderID: "requesty" maps to the models.dev requesty entry, whose ids are the managed policy ids, so the UI model picker merges those names and prices with the live /v1/models list. The EU, US and AP regional routers are listed as base URL hints and selectable through the Base URL override.
  • Channel id in spec/definition.go, alias in channel.go, builtin registration after OpenRouter in builtins.go, icon web/src/assets/channels/requesty.webp (picked up by the existing import.meta.glob, no UI code change).
  • Test expectations updated additively: registry order, embeddings support, SDK defaults, final provider contract and the route golden digest.
  • README.md, README_CN.md, README_JP.md: Requesty added to the model services list and the embeddings sentence.

Not added to internal/catalog/price_priority.go or any other automatic preference order.

Validation:

  • go build ./..., go vet ./..., gofmt -l clean on all touched files, git diff --check clean.
  • go test -count=1 . ./internal/...: all packages pass except internal/webui TestReleaseWorkflowUsesTrustedCurrentRunChecksumForExistingRelease, which fails identically on a clean main (verifier rejected assets ... exit status 127).
  • Live check through channel.NewRegistry().Resolve(channel.Requesty) and the Bifrost executor: GET /v1/models returns 200 with a valid key (778 models, openai/gpt-4o-mini present) and 403 with an invalid one, probe and chat completion against openai/gpt-4o-mini succeed with usage.cost populated, and embeddings via openai/text-embedding-3-small return 1536 dimensions.

自查清单 / Checklist

  • 我已运行 make check,或在说明中写明无法运行的原因和未验证范围。 / I ran make check, or documented why it could not run and what remains unverified. (Go steps run individually as listed above. gofmt -l . on the whole tree flags internal/subscription/runtime/runtime_test.go, which is untouched here and already unformatted on main. Web lint, format and build were not run since this change adds no web source, only a static asset.)
  • 本 PR 范围聚焦,未包含无关改动。 / This PR is focused and contains no unrelated changes.
  • 我已更新必要的公开文档或发布说明。 / I updated any required public documentation or release notes.
  • 我已确认提交、日志和测试数据不包含敏感信息。 / I confirmed that commits, logs, and fixtures contain no sensitive data.
  • 如适用,我已说明兼容性或数据迁移影响。 / Where applicable, I documented compatibility or data-migration impact. (Additive only, no migration.)

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

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

📝 Walkthrough

Walkthrough

新增 Requesty 内置渠道。该渠道使用 API Key 和默认 Base URL,并提供 EU、US、AP 区域路由。原生路由支持 Chat Completion、Embeddings、Probe 和 List Models。Responses、Anthropic 和 Gemini 使用协议转换路由。相关注册表、契约测试、SDK 默认值测试和三种语言的 README 已更新。

Priority: ➖ Normal

Merge Risk: 🟠 High · up to 884d5

Documentation currently misstates supported Embeddings channels, and an untrusted Requesty base URL could receive the configured API key. Restrict the override to Requesty endpoints before merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 9 files. (3 skipped: 3… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 标题准确概括了主要变更,即新增 Requesty channel。内容简洁、明确,并与 PR 变更一致。
Description check ✅ Passed PR 描述基本完整。它说明了变更内容、验证结果、已知测试失败、文档更新、兼容性影响和自查结果。关联 Issue 标记为 None,但已明确说明没有关联 Issue。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 9 files. (3 skipped: 3 unsupported.)


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

Note

Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.

🟡 Other comments (1)
README.md-146-146 (1)

146-146: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

同步三份 README 的原生 Embeddings 支持渠道列表。 GPTLoadNewAPI 也在 internal/channel/embeddings_module_test.go:10-39 中定义为支持原生 Embeddings 的渠道。请在以下位置补充这两个渠道:

  • README.md#L146-L146:在英文列表中加入 GPTLoadNewAPI
  • README_CN.md#L146-L146:在中文列表中加入 GPTLoadNewAPI
  • README_JP.md#L146-L146:在日文列表中加入 GPTLoadNewAPI

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: QUIET

Plan: Advanced

Run ID: 1e34b9b8-53d2-437c-a769-3a6e2509feb2

📥 Commits

Reviewing files that changed from the base of the PR and between 33ec668 and cf808b8.

📒 Files selected for processing (13)
  • README.md
  • README_CN.md
  • README_JP.md
  • internal/channel/builtins.go
  • internal/channel/channel.go
  • internal/channel/embeddings_module_test.go
  • internal/channel/final_provider_contract_test.go
  • internal/channel/modules/requesty.go
  • internal/channel/registry_test.go
  • internal/channel/route_golden_test.go
  • internal/channel/spec/definition.go
  • internal/execution/bifrost/sdk_defaults_test.go
  • web/src/assets/channels/requesty.webp

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Comment thread internal/channel/modules/requesty.go
Adds a Requesty preset next to OpenRouter on the OpenAICompatible provider
kind with a fixed base URL plus override, catalog provider id requesty and
the EU, US and AP regional routers as base URL hints. Registers the channel
id, alias and builtin, adds an icon and lists Requesty in the READMEs.
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