Repository navigation
feat(provider): add Requesty preset and OpenCode provider mapping - #60
Conversation
Adds a requesty provider preset, maps the requesty/ model prefix to REQUESTY_API_KEY for OpenCode, lists models from the Requesty managed endpoint (falling back to the full catalog), and detects REQUESTY_API_KEY in onboard and doctor.
|
Thanks for the contribution! The build and 1,334 tests pass (6 skipped), but I found two things to fix before merging:
I checked the live catalog endpoints and reproduced these gaps with three additional local test cases. I have not run an authenticated Requesty model call. |
|
Thanks for the careful review, both points were right.
|
|
🎉 This PR is included in version 0.51.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What does this PR do?
Adds Requesty (OpenAI-compatible LLM gateway) as a provider, wired everywhere OpenRouter is:
src/provider-presets.ts: newrequestypreset (https://router.requesty.ai/v1,REQUESTY_API_KEY, defaultanthropic/claude-sonnet-4-5). The EU endpointrouter.eu.requesty.ai/v1is noted in the description.src/engines/opencode.tsandsrc/engines/provider-env.ts:requestyprefix maps toREQUESTY_API_KEY, soensureOpenCodeConfigwrites the provider block forrequesty/...models.OpenCodeEngine.listModels: forrequesty/...models, lists chat models from the publicGET /v1/models/managedendpoint, falling back toGET /v1/models, then to the opencode CLI like the OpenRouter branch.src/onboard.tsandsrc/doctor.ts:REQUESTY_API_KEYcounts as a configured key. OpenRouter stays the default everywhere.How to test:
Get a key at https://app.requesty.ai/api-keys, then
REQUESTY_API_KEY=... golembot run.Type of change
Checklist
pnpm run buildpassespnpm run testpasses (1334 passed, 6 skipped)biome check src/reports no issues in the touched files. I also ran it end to end:OpenCodeEngine.invokewithrequesty/openai/gpt-4o-minithrough opencode 1.18.18 returned the expected reply, andlistModelsreturned 159 managed models.Disclosure: I work at Requesty. Happy to adjust anything to match project conventions.