Repository navigation
feat: add Requesty provider template - #93
Closed
Thibaultjaigu wants to merge 2 commits into
Closed
Thibaultjaigu wants to merge 2 commits into
Thibaultjaigu wants to merge 2 commits into
Conversation
Add Requesty (OpenAI compatible router at https://router.requesty.ai/v1) as a built-in provider template next to OpenRouter, list it in the provider docs, and cover the template with a unit test.
Contributor
AI 审查结果审查结论本次 PR 变更内容直观:在代码中新增 Requesty 供应商模板、同步中英文文档,并添加一个基本测试。整体实现简单,无重大安全问题。主要风险集中在模板默认模型 ID 的准确性(可能不符合 Requesty 实际 API 要求)以及测试覆盖不足。 问题列表1. 严重程度:中 — 模板模型 ID 可能不适用于 Requesty
2. 严重程度:低 — 新增测试覆盖不足
3. 低:文档与代码顺序已同步,无需处理
剩余风险
|
Author
|
Following up on the automated review:
中文摘要:Requesty 使用 |
Owner
|
We will not consider adding new providers for the time being. |
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.
Adds Requesty as a built-in provider template, next to OpenRouter. Requesty is an OpenAI compatible LLM router, so it uses the existing openaiCompatible protocol and needs no client changes.
概述 / Summary
Adds a "Requesty" entry to the add provider dialog. Selecting it pre-fills the name, base URL
https://router.requesty.ai/v1, API path/chat/completionsand two example models, the same way the OpenRouter template works.改动点 / Changes
spring_note/lib/core/models/provider_config.dart:Requestyadded totemplateNamesafter OpenRouter, plus a matching branch inProviderConfig.template(example modelsopenai/gpt-4.1-miniandanthropic/claude-sonnet-4-5, both marked text and image like the OpenRouter ones).docs/guide/providers.md,docs/en/guide/providers.md: Requesty added to the template list.spring_note/test/ai_client_service_test.dart: small test for the new template.截图或录屏 / Screenshots or Recordings
The only UI change is one more chip in the existing template grid of the add provider dialog.
验证方式 / Verification
flutter analyzeon the touched files: no issues. Fullflutter analyzereports the same 22 info level issues as upstreammain.flutter test:ai_client_service_test.dartandsettings_page_test.dartpass. Full suite: 297 passed, 6 failed; the same 6 tests (local_data_service, memory_services, startup_report_generation) also fail on a clean upstreammainon my machine (macOS).cargo testinspring_note/rust: not needed, no Rust changes.flutter build windows --release: not run (macOS machine).AiClientService.testProviderConnectionStreamreturned "Streaming connection succeeded" with modelopenai/gpt-4o-mini. The Rustai::chatpath returned a normal reply, andfetch_provider_modelslisted the models from/v1/models.How to try it: Settings > Providers > Add provider > Requesty, paste a key from https://app.requesty.ai/api-keys, then use a model id such as
openai/gpt-4o-mini. Docs: https://docs.requesty.ai. An EU endpoint is also available athttps://router.eu.requesty.ai/v1by editing the Base URL.检查清单 / Checklist
pubspec.yaml、pubspec.lock、Cargo.toml或Cargo.lock等对应文件。/ If this changes dependencies, I have updated the correct files such aspubspec.yaml,pubspec.lock,Cargo.toml, orCargo.lock. (No dependency changes.)破坏性变更 / Breaking changes
Disclosure: I work at Requesty. Happy to adjust anything to match project conventions.