feat(webeval): add OrcaRouter as a first-class chat completion provider - #89
Open
putraperdana1207-pixel wants to merge 1 commit into
Open
Conversation
Adds an `orcarouter` CHAT_COMPLETION_PROVIDER to webeval's client factory, mirroring the existing `openai` branch. OrcaRouter is an OpenAI-compatible gateway that exposes many upstream models behind a single endpoint (https://api.orcarouter.ai/v1) using `vendor/model` names, plus adaptive routing via `orcarouter/auto`. The new OrcaRouterClientWrapper subclasses OpenAIClientWrapper and, when no base_url/api_key is supplied, defaults to the public endpoint and the ORCAROUTER_API_KEY environment variable — so a config can be as small as {"CHAT_COMPLETION_PROVIDER": "orcarouter", "CHAT_COMPLETION_KWARGS_JSON": {"model": "openai/gpt-4o"}}. Co-Authored-By: Claude <noreply@anthropic.com>
|
putraperdana1207-pixel please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
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.
Summary
Fara runs its computer-use agents against OpenAI-compatible chat endpoints, and the
webevalevaluation framework already models those endpoints through a small provider registry (CHAT_COMPLETION_PROVIDER). This PR adds OrcaRouter as a first-class named provider there, mirroring the existingopenaibranch.OrcaRouter is an OpenAI-compatible AI gateway built for both models and agents. Like OpenRouter, it exposes a provider/model namespace across many models — but it also combines adaptive routing, automatic failover, zero-markup inference, observability, guardrails, and agent-tool governance behind the same endpoint. Adding
orcarouteras a first-class provider means this project's users can use that stack directly, without treating OrcaRouter as an anonymous custom base URL. It also runs gateway-level, zero-trust security for AI agents on the same endpoint — screening every prompt/response and governing every tool call on a default-deny basis, with no application code changes.Changes
webeval/src/webeval/oai_clients/wrapper.py— newOrcaRouterClientWrappersubclassingOpenAIClientWrapper. When nobase_url/api_keyis supplied it defaults tohttps://api.orcarouter.ai/v1and theORCAROUTER_API_KEYenv var, so the config can be as small as:{ "CHAT_COMPLETION_PROVIDER": "orcarouter", "CHAT_COMPLETION_KWARGS_JSON": { "model": "openai/gpt-4o" } }vendor/modelnames, ororcarouter/autofor adaptive routing.webeval/src/webeval/oai_clients/create_utils.py— added theorcarouterbranch tocreate_completion_client_from_env, right beside theopenaibranch, and documented it in the factory docstring.webeval/src/webeval/oai_clients/__init__.py— exported the new wrapper.webeval/tests/test_oai_clients.py— addedtest_orcarouter_provider_round_tripcovering factory resolution, provider metadata, default base URL, and a stubbedcreate()round trip.Validation
webeval/tests/test_oai_clients.py— 13 passed; fullwebeval/tests/suite — 32 passed, 2 skipped.ruff check src(repo root lint gate) — clean.https://api.orcarouter.ai/v1through the new provider path (bothorcarouter/autoandopenai/gpt-4o-mini) returnedfinish_reason=stopwith real content and token usage.I'm an engineer on the OrcaRouter team. Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter