Repository navigation
Add OpenRouter plugin #139
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
Draft
AnEvilPenguin
wants to merge
16
commits into
main
Choose a base branch
from
plugins/OpenRouter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5fb3be7
Add OpenRouter plugin
AnEvilPenguin 75c0a4f
Add OpenRouter performance metrics, providers, and task classifications
AnEvilPenguin 3617ce3
Add OpenRouter public datasets and an Ecosystem dashboard
AnEvilPenguin b1415b5
Add OpenRouter workspace settings and a Model Usage table
AnEvilPenguin edefa93
Score OpenRouter model prices as affordability
AnEvilPenguin 258f6d5
Add an OpenRouter Model Comparison dashboard beside Model Leaderboards
AnEvilPenguin 067e06f
Use smartviz tiles across the OpenRouter dashboards
AnEvilPenguin 5620220
Extend OpenRouter Model Leaderboards and fix Model drilldown links
AnEvilPenguin 416738c
Resolve OpenRouter :free models in dataset tiles by permaslug
AnEvilPenguin ecfdc26
Link uncatalogued OpenRouter models to their OpenRouter page
AnEvilPenguin 0789adb
Return OpenRouter usage as one column per metric
AnEvilPenguin bbc1b24
Show p90 latency and fill the usage lines on OpenRouter dashboards
AnEvilPenguin 7c98a32
Show how much of each OpenRouter API key's limit is used
AnEvilPenguin d9d0aa7
List everything a standard OpenRouter key can and can't read
AnEvilPenguin 8481c8c
Fall back to the model ID when OpenRouter omits a canonical slug
AnEvilPenguin 82c0a9c
Make OpenRouter dataset filters single-select and clearable
AnEvilPenguin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "steps": [ | ||
| { | ||
| "displayName": "Authenticate", | ||
| "dataStream": { | ||
| "name": "credits" | ||
| }, | ||
| "required": true, | ||
| "success": "Connected to OpenRouter.", | ||
| "error": "Could not authenticate. Check that the key is valid, enabled, and has not expired." | ||
| }, | ||
| { | ||
| "displayName": "Check management access", | ||
| "dataStream": { | ||
| "name": "workspaces" | ||
| }, | ||
| "required": false, | ||
| "success": "Management key detected. All data streams are available.", | ||
| "error": "Could not read workspaces. Workspaces, API keys, usage, and performance need a management key; everything else still works." | ||
| } | ||
| ] | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| [ | ||
| { | ||
| "name": "Model", | ||
| "sourceType": "Model", | ||
| "icon": "brain", | ||
| "singular": "Model", | ||
| "plural": "Models" | ||
| }, | ||
| { | ||
| "name": "Provider", | ||
| "sourceType": "Provider", | ||
| "icon": "server", | ||
| "singular": "Provider", | ||
| "plural": "Providers" | ||
| }, | ||
| { | ||
| "name": "Workspace", | ||
| "sourceType": "Workspace", | ||
| "icon": "layer-group", | ||
| "singular": "Workspace", | ||
| "plural": "Workspaces" | ||
| }, | ||
| { | ||
| "name": "API Key", | ||
| "sourceType": "API Key", | ||
| "icon": "key", | ||
| "singular": "API Key", | ||
| "plural": "API Keys" | ||
| } | ||
| ] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| { | ||
| "name": "apiKeys", | ||
| "displayName": "API Keys", | ||
| "description": "API keys in a workspace, with spend and limits in USD (requires a management key)", | ||
| "tags": ["API Keys", "Cost"], | ||
| "baseDataSourceName": "httpRequestScopedSingle", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "keys", | ||
| "paging": { | ||
| "mode": "offset", | ||
| "offset": { | ||
| "mode": "row", | ||
| "rowCountIn": { "realm": "payloadArraySize", "path": "data" }, | ||
| "base": 0 | ||
| }, | ||
| "out": { "realm": "queryArg", "path": "offset" } | ||
| }, | ||
| "getArgs": [ | ||
| { "key": "workspace_id", "value": "{{object.rawId}}" }, | ||
| { "key": "include_disabled", "value": "true" } | ||
| ], | ||
| "headers": [], | ||
| "pathToData": "data" | ||
| }, | ||
| "matches": { | ||
| "sourceType": { "type": "oneOf", "values": ["Workspace"] } | ||
| }, | ||
| "metadata": [ | ||
| { | ||
| "name": "hash", | ||
| "displayName": "Key Hash", | ||
| "shape": "string" | ||
| }, | ||
| { | ||
| "name": "name", | ||
| "displayName": "Name", | ||
| "shape": "string", | ||
| "role": "label" | ||
| }, | ||
| { | ||
| "name": "disabled", | ||
| "displayName": "Disabled", | ||
| "shape": "boolean" | ||
| }, | ||
| { | ||
| "name": "usage_daily", | ||
| "displayName": "Spend Today", | ||
| "shape": "usd" | ||
| }, | ||
| { | ||
| "name": "usage_weekly", | ||
| "displayName": "Spend This Week", | ||
| "shape": "usd" | ||
| }, | ||
| { | ||
| "name": "usage_monthly", | ||
| "displayName": "Spend This Month", | ||
| "shape": "usd" | ||
| }, | ||
| { | ||
| "name": "usage", | ||
| "displayName": "Total Spend", | ||
| "shape": "usd" | ||
| }, | ||
| { | ||
| "name": "limit", | ||
| "displayName": "Limit", | ||
| "shape": "usd" | ||
| }, | ||
| { | ||
| "name": "limit_remaining", | ||
| "displayName": "Limit Remaining", | ||
| "shape": "usd" | ||
| }, | ||
| { | ||
| "name": "limitUsed", | ||
| "displayName": "Limit Used (%)", | ||
| "shape": ["number", { "decimalPlaces": 1 }], | ||
| "computed": true, | ||
| "valueExpression": "{{ $['limit'] > 0 && $['limit_remaining'] != null ? Math.min(100, 100 * ($['limit'] - $['limit_remaining']) / $['limit']) : null }}" | ||
| }, | ||
| { | ||
| "name": "limit_reset", | ||
| "displayName": "Limit Reset", | ||
| "shape": "string" | ||
| }, | ||
| { | ||
| "name": "workspace_id", | ||
| "displayName": "Workspace ID", | ||
| "shape": "string" | ||
| }, | ||
| { | ||
| "name": "created_at", | ||
| "displayName": "Created", | ||
| "shape": "date" | ||
| }, | ||
| { | ||
| "name": "expires_at", | ||
| "displayName": "Expires", | ||
| "shape": "date" | ||
| } | ||
| ], | ||
| "timeframes": false | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,239 @@ | ||
| { | ||
| "name": "appRankings", | ||
| "displayName": "App Rankings", | ||
| "description": "Top public apps on OpenRouter by tokens processed, most popular or trending (from OpenRouter's public apps marketplace)", | ||
| "tags": [ | ||
| "Usage" | ||
| ], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "datasets/app-rankings", | ||
| "paging": { | ||
| "mode": "none" | ||
| }, | ||
| "getArgs": [ | ||
| { | ||
| "key": "start_date", | ||
| "value": "{{timeframe.start.substring(0, 10)}}" | ||
| }, | ||
| { | ||
| "key": "end_date", | ||
| "value": "{{timeframe.end.substring(0, 10)}}" | ||
| }, | ||
| { | ||
| "key": "sort", | ||
| "value": "{{ typeof rankBy !== 'undefined' && rankBy ? rankBy : 'popular' }}" | ||
| }, | ||
| { | ||
| "key": "category", | ||
| "value": "{{ typeof category === 'string' && ['coding', 'creative', 'productivity', 'entertainment'].includes(category) ? category : null }}" | ||
| }, | ||
| { | ||
| "key": "subcategory", | ||
| "value": "{{ typeof category === 'string' && category && !['coding', 'creative', 'productivity', 'entertainment'].includes(category) ? category : null }}" | ||
| }, | ||
| { | ||
| "key": "limit", | ||
| "value": "100" | ||
| } | ||
| ], | ||
| "headers": [], | ||
| "postRequestScript": "appRankings.js" | ||
| }, | ||
| "matches": "none", | ||
| "metadata": [ | ||
| { | ||
| "name": "rank", | ||
| "displayName": "Rank", | ||
| "shape": "number" | ||
| }, | ||
| { | ||
| "name": "app_id", | ||
| "displayName": "App ID", | ||
| "shape": "string", | ||
| "visible": false | ||
| }, | ||
| { | ||
| "name": "app_name", | ||
| "displayName": "App", | ||
| "shape": "string", | ||
| "role": "label" | ||
| }, | ||
| { | ||
| "name": "total_tokens", | ||
| "displayName": "Total Tokens", | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0, | ||
| "thousandsSeparator": true | ||
| } | ||
| ], | ||
| "role": "value" | ||
| }, | ||
| { | ||
| "name": "total_requests", | ||
| "displayName": "Total Requests", | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0, | ||
| "thousandsSeparator": true | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "name": "asOf", | ||
| "displayName": "As Of", | ||
| "shape": "date", | ||
| "visible": false | ||
| }, | ||
| { | ||
| "name": "citation", | ||
| "displayName": "Citation", | ||
| "shape": "string", | ||
| "visible": false | ||
| } | ||
| ], | ||
| "timeframes": [ | ||
| "last7days", | ||
| "last30days", | ||
| "thisMonth", | ||
| "lastMonth", | ||
| "thisQuarter", | ||
| "lastQuarter", | ||
| "thisYear", | ||
| "lastYear" | ||
| ], | ||
| "options": { | ||
| "minimumRequestIntervalSeconds": 86400 | ||
| }, | ||
| "ui": [ | ||
| { | ||
| "type": "choiceChips", | ||
| "name": "rankBy", | ||
| "label": "Rank by", | ||
| "defaultValue": "popular", | ||
| "options": [ | ||
| { | ||
| "value": "popular", | ||
| "label": "Most tokens" | ||
| }, | ||
| { | ||
| "value": "trending", | ||
| "label": "Trending" | ||
| } | ||
| ], | ||
| "help": "**Trending** ranks apps by token growth over the previous three periods of the same length, so it may return fewer apps" | ||
| }, | ||
| { | ||
| "type": "autocomplete", | ||
| "name": "category", | ||
| "label": "Category", | ||
| "isMulti": false, | ||
| "isClearable": true, | ||
| "data": { | ||
| "source": "fixed", | ||
| "values": [ | ||
| { | ||
| "label": "Coding", | ||
| "options": [ | ||
| { | ||
| "value": "coding", | ||
| "label": "All coding" | ||
| }, | ||
| { | ||
| "value": "cli-agent", | ||
| "label": "CLI agents" | ||
| }, | ||
| { | ||
| "value": "ide-extension", | ||
| "label": "IDE extensions" | ||
| }, | ||
| { | ||
| "value": "cloud-agent", | ||
| "label": "Cloud agents" | ||
| }, | ||
| { | ||
| "value": "programming-app", | ||
| "label": "Programming apps" | ||
| }, | ||
| { | ||
| "value": "native-app-builder", | ||
| "label": "Native app builders" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "label": "Creative", | ||
| "options": [ | ||
| { | ||
| "value": "creative", | ||
| "label": "All creative" | ||
| }, | ||
| { | ||
| "value": "creative-writing", | ||
| "label": "Creative writing" | ||
| }, | ||
| { | ||
| "value": "video-gen", | ||
| "label": "Video generation" | ||
| }, | ||
| { | ||
| "value": "image-gen", | ||
| "label": "Image generation" | ||
| }, | ||
| { | ||
| "value": "audio-gen", | ||
| "label": "Audio generation" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "label": "Productivity", | ||
| "options": [ | ||
| { | ||
| "value": "productivity", | ||
| "label": "All productivity" | ||
| }, | ||
| { | ||
| "value": "writing-assistant", | ||
| "label": "Writing assistants" | ||
| }, | ||
| { | ||
| "value": "general-chat", | ||
| "label": "General chat" | ||
| }, | ||
| { | ||
| "value": "personal-agent", | ||
| "label": "Personal agents" | ||
| }, | ||
| { | ||
| "value": "legal", | ||
| "label": "Legal" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "label": "Entertainment", | ||
| "options": [ | ||
| { | ||
| "value": "entertainment", | ||
| "label": "All entertainment" | ||
| }, | ||
| { | ||
| "value": "roleplay", | ||
| "label": "Roleplay" | ||
| }, | ||
| { | ||
| "value": "game", | ||
| "label": "Games" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.