feat(channel): add Requesty channel - #628
Conversation
📝 WalkthroughWalkthrough新增 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 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)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation 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. Comment |
There was a problem hiding this comment.
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支持渠道列表。GPTLoad和NewAPI也在internal/channel/embeddings_module_test.go:10-39中定义为支持原生Embeddings的渠道。请在以下位置补充这两个渠道:
README.md#L146-L146:在英文列表中加入GPTLoad和NewAPI。README_CN.md#L146-L146:在中文列表中加入GPTLoad和NewAPI。README_JP.md#L146-L146:在日文列表中加入GPTLoad和NewAPI。
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: QUIET
Plan: Advanced
Run ID: 1e34b9b8-53d2-437c-a769-3a6e2509feb2
📒 Files selected for processing (13)
README.mdREADME_CN.mdREADME_JP.mdinternal/channel/builtins.gointernal/channel/channel.gointernal/channel/embeddings_module_test.gointernal/channel/final_provider_contract_test.gointernal/channel/modules/requesty.gointernal/channel/registry_test.gointernal/channel/route_golden_test.gointernal/channel/spec/definition.gointernal/execution/bifrost/sdk_defaults_test.goweb/src/assets/channels/requesty.webp
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.
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.
cf808b8 to
884d59f
Compare
关联 Issue / Related Issue
None.
变更内容 / Change Content
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 asvendor/model, for exampleopenai/gpt-4o-mini, plus curated managed routing policies with short ids such asclaude-sonnet-4-5.Changes:
internal/channel/modules/requesty.goon theOpenAICompatibleprovider kind withEndpointFixedWithOverride(the same pattern as the SiliconFlow, Moonshot and Zhipu presets, since Bifrost ships no Requesty provider).CatalogProviderID: "requesty"maps to the models.devrequestyentry, whose ids are the managed policy ids, so the UI model picker merges those names and prices with the live/v1/modelslist. The EU, US and AP regional routers are listed as base URL hints and selectable through the Base URL override.spec/definition.go, alias inchannel.go, builtin registration after OpenRouter inbuiltins.go, iconweb/src/assets/channels/requesty.webp(picked up by the existingimport.meta.glob, no UI code change).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.goor any other automatic preference order.Validation:
go build ./...,go vet ./...,gofmt -lclean on all touched files,git diff --checkclean.go test -count=1 . ./internal/...: all packages pass exceptinternal/webui TestReleaseWorkflowUsesTrustedCurrentRunChecksumForExistingRelease, which fails identically on a cleanmain(verifier rejected assets ... exit status 127).channel.NewRegistry().Resolve(channel.Requesty)and the Bifrost executor:GET /v1/modelsreturns 200 with a valid key (778 models,openai/gpt-4o-minipresent) and 403 with an invalid one, probe and chat completion againstopenai/gpt-4o-minisucceed withusage.costpopulated, and embeddings viaopenai/text-embedding-3-smallreturn 1536 dimensions.自查清单 / Checklist
make check,或在说明中写明无法运行的原因和未验证范围。 / I ranmake 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 flagsinternal/subscription/runtime/runtime_test.go, which is untouched here and already unformatted onmain. Web lint, format and build were not run since this change adds no web source, only a static asset.)Disclosure: I work at Requesty. Happy to adjust anything to match project conventions.