@aaronjmars/openroutercli 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/SKILL.md +3 -0
- package/package.json +1 -1
- package/src/commands/models.js +33 -12
- package/src/commands/transcribe.js +4 -0
package/README.md
CHANGED
|
@@ -77,8 +77,8 @@ and run `openrouter login --management`.
|
|
|
77
77
|
| **Interactive REPL** | `openrouter chat -i` - slash commands `/model <id>`, `/reset`, `/exit`. History preserved per session. |
|
|
78
78
|
| **Multi-format inference** | `chat` (OpenAI), `messages` (Anthropic), `responses` (OpenAI Responses) - same auth, same flags, same JSON contract. |
|
|
79
79
|
| **Batches** | `batches {create,list,get,wait,results,cancel,delete}` - send a JSONL file of chat / responses / messages / embeddings requests as one async job at about half price. |
|
|
80
|
-
| **Embeddings + rerank + speech + video** | `embed` (text or images), `rerank`, `speech` (tone instructions, multi-speaker turns, voice references), `transcribe` (URL input, speaker labels, key terms, word timestamps), `video {create,wait,download}` (resolution, first/last frame, references, audio, extend) - async video jobs poll-until-done with `video wait <jobId>`. |
|
|
81
|
-
| **Model discovery with detail** | `models list` (filter, sort by price/context, `--endpoints` by API path served), `models show <id>` (full pricing breakdown - prompt, completion, cache r/w, reasoning, image, web search), `models endpoints <id> --sort throughput\|latency\|prompt\|completion\|uptime --best` for choosing the right provider variant. |
|
|
80
|
+
| **Embeddings + rerank + speech + video** | `embed` (text or images), `rerank`, `speech` (tone instructions, multi-speaker turns, voice references), `transcribe` (URL input, speaker labels, key terms, context prompt, word timestamps), `video {create,wait,download}` (resolution, first/last frame, references, audio, extend) - async video jobs poll-until-done with `video wait <jobId>`. |
|
|
81
|
+
| **Model discovery with detail** | `models list` (filter, sort by price/context, `--endpoints` by API path served, `--min-<name>-index`/`--max-<name>-index` Artificial Analysis score bounds), `models show <id>` (full pricing breakdown - prompt, completion, cache r/w, reasoning, image, web search), `models endpoints <id> --sort throughput\|latency\|prompt\|completion\|uptime --best` for choosing the right provider variant. |
|
|
82
82
|
| **Benchmarks + rankings** | `benchmarks`, `classifications`, and `datasets {apps,daily,session-cost}` expose OpenRouter's current public benchmark and usage datasets. |
|
|
83
83
|
| **Management analytics** | `analytics meta` discovers fields; `analytics query` runs metrics/dimensions/time-range queries with a management key. |
|
|
84
84
|
| **Structured decisions** | `decisions` (alias `systemone`) calls System One for typed choice, score, and yes/no outputs, with optional image inputs (`--image`) and named image assets (`--assets`). `extract` (alias `extractions`, alpha) pulls typed fields (text, number, date, list, estimate, forecast...) out of text or attached image/PDF assets. |
|
package/SKILL.md
CHANGED
|
@@ -220,6 +220,7 @@ openrouter speech "Hi" -m <cloning-model> --ref ./sample.wav --ref-text "words i
|
|
|
220
220
|
openrouter transcribe ./clip.wav -m openai/gpt-4o-transcribe # alias: stt
|
|
221
221
|
openrouter transcribe --url https://example.com/call.mp3 -m elevenlabs/scribe-v2 --diarize
|
|
222
222
|
openrouter transcribe ./talk.mp3 -m elevenlabs/scribe-v2 --keyterms OpenRouter,BYOK --timestamps word
|
|
223
|
+
openrouter transcribe ./standup.m4a -m openai/gpt-4o-transcribe --prompt "Team standup about BYOK routing"
|
|
223
224
|
|
|
224
225
|
# Image generation (writes image-0.png, ...): tier or exact size, reference images
|
|
225
226
|
openrouter image "a red bike on a beach" -m google/gemini-2.5-flash-image -o bike.png
|
|
@@ -242,6 +243,8 @@ openrouter video create "keep going" -m <video-model> --extend <jobId>
|
|
|
242
243
|
openrouter models # all (~430)
|
|
243
244
|
openrouter models --filter sonnet --sort prompt # local sort, cheapest first
|
|
244
245
|
openrouter models --order intelligence-high-to-low # server-side ranking
|
|
246
|
+
openrouter models --min-cyber-index 50 --max-price 2 # Artificial Analysis index bounds (0-100):
|
|
247
|
+
# intelligence, coding, agentic, cyber, decision, legal, ...
|
|
245
248
|
openrouter models --free # only :free models
|
|
246
249
|
openrouter models --input-modalities image # image-INPUT (vision) models
|
|
247
250
|
openrouter models --output-modalities image # image-OUTPUT models
|
package/package.json
CHANGED
package/src/commands/models.js
CHANGED
|
@@ -11,6 +11,29 @@ import { c, isJsonMode, outln, pricePerMillion, printResult, table } from "../ou
|
|
|
11
11
|
const ENDPOINT_SORT_FIELDS = ["throughput", "latency", "prompt", "completion", "uptime", "context"];
|
|
12
12
|
const MODEL_SORT_FIELDS = ["id", "name", "context", "prompt", "completion"];
|
|
13
13
|
|
|
14
|
+
// Artificial Analysis index filters: --min-<name>-index / --max-<name>-index (0-100).
|
|
15
|
+
const AA_INDEXES = [
|
|
16
|
+
"intelligence",
|
|
17
|
+
"coding",
|
|
18
|
+
"agentic",
|
|
19
|
+
"cyber",
|
|
20
|
+
"decision",
|
|
21
|
+
"economics",
|
|
22
|
+
"engineering",
|
|
23
|
+
"finance-and-accounting",
|
|
24
|
+
"healthcare-and-medical",
|
|
25
|
+
"legal",
|
|
26
|
+
"multilingual",
|
|
27
|
+
"openness",
|
|
28
|
+
"strategy-and-ops",
|
|
29
|
+
];
|
|
30
|
+
const INDEX_FLAGS = AA_INDEXES.flatMap((name) =>
|
|
31
|
+
["min", "max"].map((bound) => [
|
|
32
|
+
`${bound}-${name}-index`,
|
|
33
|
+
`${bound}_${name.replaceAll("-", "_")}_index`,
|
|
34
|
+
]),
|
|
35
|
+
);
|
|
36
|
+
|
|
14
37
|
const PRICE_COLUMN = {
|
|
15
38
|
label: "in/out $/M",
|
|
16
39
|
value: (x) => {
|
|
@@ -50,6 +73,14 @@ Options for list:
|
|
|
50
73
|
--providers <csv> Hosting provider names
|
|
51
74
|
--distillable <true|false> Filter by distillation capability
|
|
52
75
|
--zdr Only models with ZDR endpoints
|
|
76
|
+
--min-<name>-index <n> Artificial Analysis index score bounds (0-100;
|
|
77
|
+
--max-<name>-index <n> unscored models are excluded). <name>:
|
|
78
|
+
intelligence|coding|agentic|cyber|decision|
|
|
79
|
+
economics|engineering|finance-and-accounting|
|
|
80
|
+
healthcare-and-medical|legal|multilingual|
|
|
81
|
+
openness|strategy-and-ops
|
|
82
|
+
--min-tool-success-rate <n>, --max-tool-success-rate <n>
|
|
83
|
+
--min-age-days <n>, --max-age-days <n>
|
|
53
84
|
--endpoints <csv> Only models served on every listed API path, e.g.
|
|
54
85
|
/api/v1/messages or /api/alpha/extractions
|
|
55
86
|
(without --output-modalities: every modality)
|
|
@@ -81,12 +112,7 @@ function listQuery(values) {
|
|
|
81
112
|
["max-output-price", "max_output_price"],
|
|
82
113
|
["min-age-days", "min_age_days"],
|
|
83
114
|
["max-age-days", "max_age_days"],
|
|
84
|
-
|
|
85
|
-
["max-intelligence-index", "max_intelligence_index"],
|
|
86
|
-
["min-coding-index", "min_coding_index"],
|
|
87
|
-
["max-coding-index", "max_coding_index"],
|
|
88
|
-
["min-agentic-index", "min_agentic_index"],
|
|
89
|
-
["max-agentic-index", "max_agentic_index"],
|
|
115
|
+
...INDEX_FLAGS,
|
|
90
116
|
["min-tool-success-rate", "min_tool_success_rate"],
|
|
91
117
|
["max-tool-success-rate", "max_tool_success_rate"],
|
|
92
118
|
];
|
|
@@ -124,12 +150,7 @@ const LIST_OPTIONS = {
|
|
|
124
150
|
endpoints: { type: "string" },
|
|
125
151
|
"min-age-days": { type: "string" },
|
|
126
152
|
"max-age-days": { type: "string" },
|
|
127
|
-
|
|
128
|
-
"max-intelligence-index": { type: "string" },
|
|
129
|
-
"min-coding-index": { type: "string" },
|
|
130
|
-
"max-coding-index": { type: "string" },
|
|
131
|
-
"min-agentic-index": { type: "string" },
|
|
132
|
-
"max-agentic-index": { type: "string" },
|
|
153
|
+
...Object.fromEntries(INDEX_FLAGS.map(([flag]) => [flag, { type: "string" }])),
|
|
133
154
|
"min-tool-success-rate": { type: "string" },
|
|
134
155
|
"max-tool-success-rate": { type: "string" },
|
|
135
156
|
};
|
|
@@ -24,6 +24,8 @@ Options:
|
|
|
24
24
|
some providers only)
|
|
25
25
|
--language <code> ISO-639-1 language hint (e.g. en)
|
|
26
26
|
--temperature <n>
|
|
27
|
+
--prompt <text> Context to guide transcription (providers with
|
|
28
|
+
contextual prompting; beats provider prompt options)
|
|
27
29
|
--format <fmt> response_format: json | verbose_json (default: json;
|
|
28
30
|
verbose_json when --diarize or --timestamps is set)
|
|
29
31
|
--timestamps <l> word,segment (timestamp_granularities, verbose_json only)
|
|
@@ -83,6 +85,7 @@ export async function transcribeCommand(argv) {
|
|
|
83
85
|
url: { type: "string" },
|
|
84
86
|
language: { type: "string" },
|
|
85
87
|
temperature: { type: "string" },
|
|
88
|
+
prompt: { type: "string" },
|
|
86
89
|
format: { type: "string" },
|
|
87
90
|
timestamps: { type: "string", multiple: true },
|
|
88
91
|
diarize: { type: "boolean" },
|
|
@@ -123,6 +126,7 @@ export async function transcribeCommand(argv) {
|
|
|
123
126
|
if (values.language) form.append("language", values.language);
|
|
124
127
|
if (values.temperature !== undefined && values.temperature !== "")
|
|
125
128
|
form.append("temperature", String(numberOption(values.temperature, "--temperature")));
|
|
129
|
+
if (values.prompt !== undefined) form.append("prompt", values.prompt);
|
|
126
130
|
if (format) form.append("response_format", format);
|
|
127
131
|
for (const t of timestamps) form.append("timestamp_granularities[]", t);
|
|
128
132
|
if (values.diarize) form.append("diarize", "true");
|