Skip to content

feat: add Requesty provider preset - #82

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

Thibaultjaigu wants to merge 1 commit into
Zhou-Shilin:mainfrom
Thibaultjaigu:add-requesty-provider

Conversation

@Thibaultjaigu

@Thibaultjaigu Thibaultjaigu commented Sep 24, 2026 •

Copy link
Copy Markdown

Summary

Adds Requesty (https://docs.requesty.ai) as a provider preset. Requesty is an OpenAI compatible router with one key for OpenAI, Anthropic, Google, DeepSeek and others. pi-ai has no Requesty built in, so this goes through the existing custom openai-completions path, the same way the OpenAI compatible preset does, and it is wired at each place OpenRouter is special cased.

Changes

  • PiProviderCatalog.kt: new requesty preset (not a built in) under the Aggregators category, with base URL https://router.requesty.ai/v1 prefilled and editable, and default model openai/gpt-5.4. The custom() helper gained optional defaultBaseUrl, defaultModelId and category parameters. Requesty is not in Recommended and is never a default provider.
  • ProviderBrandIcon.kt plus composeResources/drawable/provider_requesty.xml: brand icon, next to the OpenRouter one.
  • ModelCapabilities.kt: Requesty compatibility family, detected by host, using the same reasoning disable style as OpenRouter.
  • SessionExecutionManager.kt and IosComposeApp.kt: Requesty base URLs show the visible reasoning trace, same as OpenRouter.
  • Model sync (ProviderModelCatalogClient.kt on Android, SharedProviderModelCatalogClient.kt in shared): for Requesty it reads GET /models/managed first (curated ids such as claude-sonnet-4-5), then the normal GET /models (vendor/model ids), and drops duplicates. If one endpoint fails the other is still used. The error only shows when both fail, and then the existing models.dev fallback applies (models.dev already has a requesty provider id).

Not touched: the lobehub icon copy map in app/build.gradle.kts (lobehub has no Requesty icon), and the legacy host migration in builtInProviderIdForHost, which only covers pi-ai built ins.

Tests:

  • ProviderConfigFormTest: provider count 36 to 37, custom presets are openai-compatible and requesty, and Requesty prefills its base URL.
  • PiProviderMapperTest: Requesty maps to custom / openai-completions with an aether- provider id, base URL, model and key.
  • ProviderModelCatalogClientTest (MockWebServer) and SharedProviderModelCatalogClientTest (MockEngine): managed list requested first, then the catalog, merged in order with the Bearer key sent.

How to test

  1. Create a key at https://app.requesty.ai/api-keys (the same value you would put in REQUESTY_API_KEY).
  2. Settings > Providers > add Requesty and paste the key. The base URL is prefilled with https://router.requesty.ai/v1. EU users can change it to https://router.eu.requesty.ai/v1.
  3. Sync models. The managed ids come first, then vendor/model ids.
  4. Pick openai/gpt-4o-mini (or anthropic/claude-sonnet-4-5) and send a message.

Checks

  • ./gradlew :shared:testDebugUnitTest :app:testDebugUnitTest (JDK 17): BUILD SUCCESSFUL, app 243 tests and shared 143 tests, 0 failures.
  • pi-bridge: npm run check passes. npm test gives 45 of 47 passing. The two failing tests (accepts steer and follow-up messages on a live persistent harness and aborts an active harness by session id) are timing tests. They failed in my local run on Node 22 (CI uses Node 24), and this PR does not touch the bridge.
  • Manual live check with a real key:
    • Model sync through ProviderModelCatalogClient returned 920 ids, managed ids first, including openai/gpt-4o-mini.
    • A run_turn through the pi bridge using the model config produced by toPiModelConfig() (custom, openai-completions, openai/gpt-4o-mini) returned "pong". The response model was gpt-4o-mini-2024-07-18 and the stop reason was stop.

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

Summary by CodeRabbit

  • New Features
    • Added Requesty as a provider option, with its default endpoint and model.
    • Requesty model discovery now includes managed models and avoids duplicate entries.
    • Visible reasoning traces are supported for Requesty models.

Add Requesty as an OpenAI compatible preset under Aggregators with its router endpoint prefilled, a brand icon, OpenRouter style reasoning handling, and model discovery that lists the managed models before the full catalog.
@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 7fa0baf4-4ed6-4b57-be3e-756adcfc6695

📥 Commits

Reviewing files that changed from the base of the PR and between 54583f2 and 024243b.

📒 Files selected for processing (12)
  • app/src/main/java/com/zhousl/aether/data/ModelCapabilities.kt
  • app/src/main/java/com/zhousl/aether/data/ProviderModelCatalogClient.kt
  • app/src/main/java/com/zhousl/aether/data/SessionExecutionManager.kt
  • app/src/test/java/com/zhousl/aether/data/ProviderModelCatalogClientTest.kt
  • app/src/test/java/com/zhousl/aether/data/pi/PiProviderMapperTest.kt
  • app/src/test/java/com/zhousl/aether/ui/ProviderConfigFormTest.kt
  • shared/src/commonMain/composeResources/drawable/provider_requesty.xml
  • shared/src/commonMain/kotlin/com/zhousl/aether/data/PiProviderCatalog.kt
  • shared/src/commonMain/kotlin/com/zhousl/aether/data/SharedProviderModelCatalogClient.kt
  • shared/src/commonMain/kotlin/com/zhousl/aether/ui/ProviderBrandIcon.kt
  • shared/src/commonTest/kotlin/com/zhousl/aether/data/SharedProviderModelCatalogClientTest.kt
  • shared/src/iosMain/kotlin/com/zhousl/aether/ui/IosComposeApp.kt

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


📝 Walkthrough

Walkthrough

This change registers Requesty as a provider with its default endpoint and model. It adds managed-model discovery, Requesty capability handling, visible reasoning trace support, an icon mapping, and tests for provider setup and model retrieval.

Changes

Requesty provider support

Layer / File(s) Summary
Register Requesty provider
shared/src/commonMain/kotlin/com/zhousl/aether/data/PiProviderCatalog.kt, shared/src/commonMain/composeResources/drawable/provider_requesty.xml, shared/src/commonMain/kotlin/com/zhousl/aether/ui/ProviderBrandIcon.kt, app/src/test/java/com/zhousl/aether/ui/ProviderConfigFormTest.kt, app/src/test/java/com/zhousl/aether/data/pi/PiProviderMapperTest.kt
Adds Requesty provider defaults, an icon mapping, and tests for provider configuration and Pi mapping.
Fetch Requesty model catalogs
shared/src/commonMain/kotlin/com/zhousl/aether/data/SharedProviderModelCatalogClient.kt, app/src/main/java/com/zhousl/aether/data/ProviderModelCatalogClient.kt, shared/src/commonTest/kotlin/com/zhousl/aether/data/SharedProviderModelCatalogClientTest.kt, app/src/test/java/com/zhousl/aether/data/ProviderModelCatalogClientTest.kt
Fetches managed models before the full catalog, merges results with case-insensitive deduplication, and tests request order and results.
Apply Requesty reasoning capabilities
app/src/main/java/com/zhousl/aether/data/ModelCapabilities.kt, app/src/main/java/com/zhousl/aether/data/SessionExecutionManager.kt, shared/src/iosMain/kotlin/com/zhousl/aether/ui/IosComposeApp.kt
Recognizes Requesty during model capability resolution and adds its base URL to visible reasoning trace checks.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant SharedProviderModelCatalogClient
  participant ManagedModelsEndpoint as Requesty /managed endpoint
  participant CatalogModelsEndpoint as Requesty /models endpoint
  SharedProviderModelCatalogClient->>ManagedModelsEndpoint: Fetch managed models
  ManagedModelsEndpoint-->>SharedProviderModelCatalogClient: Return managed models
  SharedProviderModelCatalogClient->>CatalogModelsEndpoint: Fetch full catalog
  CatalogModelsEndpoint-->>SharedProviderModelCatalogClient: Return catalog models
  SharedProviderModelCatalogClient->>SharedProviderModelCatalogClient: Merge and deduplicate model IDs
Loading

Suggested reviewers: zhou-shilin

Merge Risk: ⚪ Minimal · up to 02424

Requesty model discovery preserves the intended fallback behavior; no actionable merge-blocking risk is established after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.90% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 11 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a Requesty provider preset. It matches the changes across provider configuration, model discovery, compatibility handling, tests, and …
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 6.90% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 11 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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.

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