wesight icon indicating copy to clipboard operation
wesight copied to clipboard

[Feature] OrcaRouter provider support for WeSight

Open armyluki-wq opened this issue 3 months ago • 2 comments

Problem Statement

Local coding agents such as Claude Code, Codex, OpenClaw, and Hermes Agent are powerful, but their setup, model routing, permissions, and runtime metrics usually live in separate terminal worlds. WeSight pulls them into one desktop workspace with a beginner-friendly install and detect flow, visual chat with tool panels and diffs, Feishu IM routing, and an AI Runtime Dashboard that tracks tokens, TTFT, and per-engine throughput. That visibility is the first thing to go missing when people mix several engines.

Because WeSight already makes model providers a first-class setting, from official OpenAI, Anthropic, and Gemini to OpenAI-compatible endpoints for DeepSeek, Qwen, Moonshot, Ollama, OpenRouter, and custom gateways, another well-behaved provider extends that value directly: users can point every supported engine at models that fit their cost and latency needs.

Proposed Solution

I propose OrcaRouter as an optional, additive provider for WeSight. OrcaRouter exposes an OpenAI-compatible API and uses standard API-key authentication, so it fits the same slot where WeSight already manages OpenAI-compatible endpoints, and it would not replace or alter any existing provider. For users running several coding agents through one workspace, the most relevant capabilities are:

  • Many chat, reasoning, image, and video models through one endpoint, so a single key covers a wider range of model choices.
  • Automatic model routing and provider failover, complementing WeSight's per-engine model mapping.
  • Usage tracking and budgets, so shared keys do not become surprise bills.
  • Team access controls for groups sharing one WeSight setup.

The expected integration point is the model-provider layer behind the Settings UI and the engine adapters under src/main/libs/agentEngine: adding OrcaRouter would resemble adding another OpenRouter-style entry, a base URL plus an API key that engines following WeSight-managed settings can select. This is a proposal only; no implementation or testing has been done, and nothing requires an architecture change.

OrcaRouter is already integrated in open-source projects such as Dify, promptfoo, goose, and OpenCode, with examples at https://www.orcarouter.ai/built-with.

For transparency, I'm an engineer on the OrcaRouter team. We run an optional partner program where approved open-source projects can receive a 5% revenue share from OrcaRouter usage attributed to their integration. Participation is not a prerequisite for adding or using the provider, and I am happy to follow any disclosure or governance requirements this project prefers.

Alternatives Considered

Users who want broader model coverage today can add OrcaRouter's endpoint as a custom provider themselves. A built-in option would make that discoverable and documented for everyone and let WeSight apply its own labels, routing, and telemetry consistently.

Additional Context

Maintainers, I would welcome your thoughts on whether an OrcaRouter preset fits the project's direction. With your go-ahead, I am glad to open an implementation PR (provider entry, docs, and tests) that follows your contribution guidelines.

Checklist

  • [x] I have searched for existing feature requests
  • [x] This feature would be useful to other users

armyluki-wq avatar Sep 05 '26 01:09 armyluki-wq

Thanks for the detailed writeup, and for disclosing the partner program up front — that part is genuinely appreciated.

I looked into this rather than just reacting to it, because the integration point you describe is accurate: WeSight does already treat OpenAI-compatible endpoints as a first-class provider slot (ProviderName / PROVIDER_DEFINITIONS in src/shared/providers/constants.ts, where openrouter already lives), so an additional preset really would be a small, additive change rather than an architectural one.

What I checked, and what I found:

The listed integrations are partly verifiable. Searching the actual upstream repositories:

  • promptfoo — real and merged: src/providers/orcarouter.ts, test/providers/orcarouter.test.ts, docs and an example config. 12 matching files.
  • goose — real: crates/goose-providers/src/declarative/definitions/orcarouter.json, registered in declarative.rs and provider_metadata.json.
  • Dify — I could not find any match for orcarouter in langgenius/dify.
  • OpenCode — no match in the upstream repository either.

So two of the four check out. I would suggest dropping or correcting the other two, since an unverifiable claim in an integration pitch costs you more credibility than the two solid ones buy.

The scale of the campaign is the part that gives me pause. This same request has been filed as at least 52 issues across other repositories — JetBrains/junie, openai/openai-cli, langgenius-adjacent projects, and many more — with near-identical wording and the project name swapped in. That is not a reason to reject the technical proposal, and I do not think it is dishonest given you disclosed the revenue share. But it does mean this arrived as vendor outreach rather than as a user hitting a real limitation in WeSight, and that is a different thing for a maintainer to weigh.

Where that leaves it. This is not something I would implement without a maintainer decision, for reasons that are product, not code:

  1. The provider list is a curated surface with visible defaults. Adding an entry is an endorsement, not just a base URL, and a 5% revenue share attached to that endorsement is exactly the kind of thing that should be an explicit maintainer call with a disclosure policy behind it — not something merged quietly by a contributor.
  2. WeSight already supports this today. Anyone who wants OrcaRouter can add https://api.orcarouter.ai/v1 as a custom OpenAI-compatible endpoint with their own key, and it should work with no code change. The feature request is about discoverability and a built-in label, which is real but not urgent.
  3. There is no CONTRIBUTING.md or disclosure policy in this repo yet, so there is no existing rule to apply to a revenue-sharing integration. That gap is worth closing before the first such integration lands, not after.

@freestylefly this one is your call. If you decide you want it, the implementation is genuinely small — one PROVIDER_DEFINITIONS record, an entry in ProviderName, docs, and a test — and I am happy to prepare it. If you would rather not take sponsored provider presets at all, that is an equally reasonable answer and probably worth writing down somewhere so the next one of these has a short answer.

Leaving this open for a maintainer decision rather than closing it.

yan-6 avatar Sep 21 '26 01:09 yan-6

Follow-up with new information that bears on this decision, since a second request of the same shape has arrived.

PR #89 (feat(providers): add Requesty provider, opened 2026-09-24) proposes adding Requesty — another LLM gateway — registered everywhere OpenRouter is. It is the same category of request as this issue, but submitted as finished code rather than a proposal.

Scale check on that one, via the GitHub search API: the author has 526 public PRs total, of which 510 are titled some variant of "add Requesty provider" across different repositories. For comparison, this issue's OrcaRouter request appears in 52 repositories from its author. Both are mass outreach campaigns rather than project-specific contributions. That does not make either technically wrong — PR #89 is a competent, genuinely opt-in change — but it does mean the decision you make here is a policy precedent, not a one-off.

The practical point: the provider list is a curated slot with defaults, so each built-in entry reads as an endorsement. This issue additionally carries a disclosed 5% revenue-share partner program. PR #89 discloses no such arrangement. If you accept one gateway and decline the other, the reason should be written down somewhere, or the next ten requests will each need re-litigating.

I checked again today and the repo still has no CONTRIBUTING.md or governance/disclosure policy at any of the usual paths. Adding a short rule — for example "third-party gateways are supported via the existing custom OpenAI-compatible endpoint; built-in presets require X, and any revenue-sharing relationship must be disclosed in the PR" — would settle both this issue and #89 by reference instead of case by case.

Still not implementing this automatically: WeSight already works with OrcaRouter today if a user adds api.orcarouter.ai/v1 as a custom OpenAI-compatible endpoint. The ask here is for a built-in label, which is a maintainer judgement call, not a bug.

yan-6 avatar Oct 01 '26 01:10 yan-6