-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat(agent): Add OrcaRouter as a named AI agent provider #3440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: alpha
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1789,6 +1789,12 @@ To configure the AI agent for your dashboard, you need to add the `agent` config | |
| "model": "gpt-4.1", | ||
| "apiKey": "YOUR_OPENAI_API_KEY" | ||
| }, | ||
| { | ||
| "name": "OrcaRouter (auto)", | ||
| "provider": "orcarouter", | ||
| "model": "orcarouter/auto", | ||
| "apiKey": "YOUR_ORCAROUTER_API_KEY" | ||
| }, | ||
| ] | ||
| } | ||
| } | ||
|
|
@@ -1799,7 +1805,7 @@ To configure the AI agent for your dashboard, you need to add the `agent` config | |
| | `agent` | Object | Yes | The AI agent configuration object. When using the environment variable, provide the complete agent configuration as a JSON string. | | ||
| | `agent.models` | Array | Yes | Array of AI model configurations available to the agent. | | ||
| | `agent.models[*].name` | String | Yes | The display name for the model (e.g., `ChatGPT 4.1`). | | ||
| | `agent.models[*].provider` | String | Yes | The AI provider identifier (e.g., "openai"). | | ||
| | `agent.models[*].provider` | String | Yes | The AI provider identifier (e.g., "openai" or "orcarouter"). | | ||
| | `agent.models[*].model` | String | Yes | The specific model name from the provider (e.g., `gpt-4.1`). | | ||
| | `agent.models[*].apiKey` | String | Yes | The API key for authenticating with the AI provider. | | ||
|
|
||
|
|
@@ -1808,7 +1814,7 @@ The agent will use the configured models to process natural language commands an | |
| ### Providers | ||
|
|
||
| > [!Note] | ||
| > Currently, only OpenAI models are supported. Support for additional providers may be added in future releases. | ||
| > The following AI providers are supported. Additional providers may be added in future releases. | ||
|
|
||
| #### OpenAI | ||
|
|
||
|
|
@@ -1842,6 +1848,39 @@ To get an OpenAI API key for use with the AI agent: | |
| > [!Important] | ||
| > Keep your API key secure and never commit it to version control. Consider using environment variables or secure configuration management for production deployments. | ||
|
|
||
| #### OrcaRouter | ||
|
|
||
| [OrcaRouter](https://www.orcarouter.ai) is a gateway that provides access to a wide range of frontier models through a single OpenAI-compatible API. 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. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- README context ---'
sed -n '1838,1862p' README.md
printf '%s\n' '--- Parse-Dashboard/app.js context ---'
sed -n '1065,1125p' Parse-Dashboard/app.js
printf '%s\n' '--- Relevant authorization and confirmation references ---'
rg -n -C 3 'permission|confirm|confirmation|tool_calls|function_call|execute' Parse-Dashboard/app.js README.mdRepository: parse-community/parse-dashboard Length of output: 29063 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
import re
path = Path("Parse-Dashboard/app.js")
text = path.read_text()
markers = [
"if (responseMessage.tool_calls && responseMessage.tool_calls.length > 0)",
"const functionArgs = JSON.parse(toolCall.function.arguments)",
"const result = await executeDatabaseFunction(functionName, functionArgs, appContext, operationLog, permissions)",
"if (writeOperations.includes(functionName))",
"if (!hasPermission)",
"if (!confirmed)",
]
positions = {marker: text.find(marker) for marker in markers}
print("tool_call_execution_order:")
for marker in markers[:3]:
print(f"{positions[marker]:6d} {marker}")
print("permission_guard:", positions[markers[4]] > positions[markers[2]])
print("confirmation_guard:", positions[markers[5]] > positions[markers[2]])
print("local_executor_present:", "async function executeDatabaseFunction(" in text)
# Show which guards are present in the local executor without running repository code.
executor = text[text.index("async function executeDatabaseFunction("):]
for name in ["createObject", "updateObject", "deleteObject", "createClass", "deleteClass"]:
match = re.search(rf"case '{name}':.*?(?=\n\s*case '|\n\s*default:|\n\s*}}\s*$)", executor, re.S)
print(f"{name}_requires_confirmed:", bool(match and re.search(r"if\s*\(!confirmed\)", match.group(0))))
PYRepository: parse-community/parse-dashboard Length of output: 730 Separate gateway screening from local authorization. Parse Dashboard executes provider-returned 🤖 Prompt for AI Agents |
||
|
|
||
| To use OrcaRouter with the AI agent: | ||
|
|
||
| 1. **Create an account**: Sign up at [orcarouter.ai](https://www.orcarouter.ai) and add credits. | ||
|
|
||
| 2. **Generate an API key**: Create an API key in the OrcaRouter dashboard. Keys are prefixed with `sk-orca-`. | ||
|
|
||
| 3. **Configure the dashboard**: Add an `orcarouter` model to your Parse Dashboard configuration: | ||
|
|
||
| ```json | ||
| { | ||
| "agent": { | ||
| "models": [ | ||
| { | ||
| "name": "OrcaRouter (auto)", | ||
| "provider": "orcarouter", | ||
| "model": "orcarouter/auto", | ||
| "apiKey": "YOUR_ORCAROUTER_API_KEY" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| - `provider` must be `orcarouter`. | ||
| - `model` can be any model routed by OrcaRouter, e.g. `orcarouter/auto` (automatic routing), `deepseek/deepseek-v4-pro`, or `anthropic/claude-haiku-4.5`. | ||
|
|
||
| > [!Important] | ||
| > Keep your API key secure and never commit it to version control. Consider using environment variables or secure configuration management for production deployments. | ||
|
|
||
| ## Views | ||
|
|
||
| ▶️ *Core > Views* | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Fail closed on provider lookup.
AGENT_PROVIDERS[provider.toLowerCase()]is not a safe registry-membership test. A truthy non-string provider causes a 500, and inherited names such asconstructoror__proto__pass the support gate even though they are not registered. Normalize only string providers and useObject.prototype.hasOwnProperty.call. Remove the OpenAI fallback so unknown providers fail instead of being routed elsewhere.Proposed validation fix
Also applies to: 928-934
🤖 Prompt for AI Agents