@cjhyy/code-shell 0.1.7 → 0.3.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/CHANGELOG.md +108 -0
- package/README.md +35 -2
- package/dist/anthropic-DJXVKFMJ.js +1 -0
- package/dist/arena/index.js +1 -1
- package/dist/arena-MRBATZFD.js +3 -0
- package/dist/chunk-2OD6VR4N.js +2 -0
- package/dist/{chunk-RP26WO4R.js → chunk-5QIVXFCT.js} +1 -1
- package/dist/{chunk-NFH3UQ3E.js → chunk-AFMP73YP.js} +1 -1
- package/dist/{chunk-XDOWC7EG.js → chunk-D3TVASD2.js} +2 -2
- package/dist/chunk-DI26OUIU.js +2 -0
- package/dist/chunk-FZXY554D.js +2 -0
- package/dist/chunk-GGVAOPI7.js +1 -0
- package/dist/chunk-GKAQH2DG.js +2 -0
- package/dist/chunk-GYNO4R7R.js +2 -0
- package/dist/{chunk-Q4O2HGWS.js → chunk-K4HILJ6G.js} +3 -3
- package/dist/chunk-M7VU4YVY.js +49 -0
- package/dist/chunk-MLCTC53I.js +1 -0
- package/dist/{chunk-HIJ2XXGX.js → chunk-OWBYLMDD.js} +1 -1
- package/dist/chunk-SKIX2M5Z.js +4 -0
- package/dist/chunk-SV7H4FKT.js +3 -0
- package/dist/{chunk-Y2NS6HPO.js → chunk-WONQHE4P.js} +41 -41
- package/dist/{chunk-WOP6MJKW.js → chunk-X2S7ASQ2.js} +1 -1
- package/dist/chunk-Z5HKHAO7.js +336 -0
- package/dist/cli/commands/builtin/plugin-commands-registration.d.ts +12 -0
- package/dist/cli/commands/builtin/plugin-handler.d.ts +6 -0
- package/dist/cli/commands/registry.d.ts +9 -2
- package/dist/cli/main.js +140 -124
- package/dist/cli/onboarding.d.ts +7 -2
- package/dist/client-base-GSFXPP2Y.js +1 -0
- package/dist/compaction-L3Y6NG4N.js +1 -0
- package/dist/context/compaction.d.ts +2 -1
- package/dist/data/static-catalogs.d.ts +25 -0
- package/dist/devtools-FBX4HVVY.js +1 -0
- package/dist/engine/engine.d.ts +45 -0
- package/dist/engine/turn-loop.d.ts +45 -0
- package/dist/hooks/events.d.ts +84 -5
- package/dist/hooks/inject.d.ts +19 -0
- package/dist/hooks/shell-runner.d.ts +45 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1 -1
- package/dist/llm/api-key-sanitize.d.ts +22 -0
- package/dist/llm/capabilities/index.d.ts +20 -0
- package/dist/llm/capabilities/rules.d.ts +26 -0
- package/dist/llm/capabilities/types.d.ts +108 -0
- package/dist/llm/model-pool.d.ts +7 -0
- package/dist/llm/provider-catalog.d.ts +2 -0
- package/dist/llm/provider-kinds.d.ts +1 -1
- package/dist/llm/providers/openai.d.ts +45 -0
- package/dist/llm/retry.d.ts +12 -0
- package/dist/llm/stream-watchdog.d.ts +42 -0
- package/dist/llm/types.d.ts +8 -0
- package/dist/logging/logger.d.ts +24 -2
- package/dist/logging/session-recorder.d.ts +16 -3
- package/dist/manager-4XKLZHKE.js +1 -0
- package/dist/mcp-manager-3JGHEJO3.js +1 -0
- package/dist/model-fetcher-X5W5EASG.js +1 -0
- package/dist/openai-OQ6LLN5J.js +1 -0
- package/dist/{openrouter-models-AM6M52D6.js → openrouter-models-ZT4R2AE3.js} +1 -1
- package/dist/openrouter-sync-ARMVWY7S.js +1 -0
- package/dist/plugin-handler-GJISMH5Q.js +11 -0
- package/dist/plugins/gitOps.d.ts +23 -0
- package/dist/plugins/installedPlugins.d.ts +15 -0
- package/dist/plugins/knownMarketplaces.d.ts +10 -0
- package/dist/plugins/loadPluginHooks.d.ts +52 -0
- package/dist/plugins/marketplaceManager.d.ts +49 -0
- package/dist/plugins/parseMarketplaceInput.d.ts +16 -0
- package/dist/plugins/pluginCommandHook.d.ts +54 -0
- package/dist/plugins/pluginCommandsLoader.d.ts +25 -0
- package/dist/plugins/pluginInstaller.d.ts +36 -0
- package/dist/plugins/schemas.d.ts +9 -0
- package/dist/plugins/types.d.ts +73 -2
- package/dist/plugins/varRewrite.d.ts +42 -0
- package/dist/product/index.js +1 -1
- package/dist/protocol/client.d.ts +1 -1
- package/dist/protocol/helpers.d.ts +42 -0
- package/dist/render/clearTerminal.d.ts +9 -3
- package/dist/render/components/App.d.ts +1 -0
- package/dist/render/components/Static.d.ts +23 -0
- package/dist/render/devtools.d.ts +8 -4
- package/dist/render/dom.d.ts +2 -1
- package/dist/render/frame.d.ts +1 -0
- package/dist/render/index.d.ts +10 -0
- package/dist/render/ink.d.ts +24 -2
- package/dist/render/log-update.d.ts +12 -1
- package/dist/render/selection.d.ts +1 -1
- package/dist/run/index.js +1 -1
- package/dist/{seatbelt-WBYROQT6.js → seatbelt-L54CNI2Y.js} +5 -5
- package/dist/services/index.d.ts +1 -0
- package/dist/services/memory-orchestrator.d.ts +39 -0
- package/dist/settings/schema.d.ts +168 -21
- package/dist/skills/frontmatter.d.ts +13 -0
- package/dist/skills/index.d.ts +4 -4
- package/dist/skills/scanner.d.ts +11 -21
- package/dist/tool-summary-HJX6RHG4.js +2 -0
- package/dist/tool-system/builtin/agent-notifications.d.ts +55 -0
- package/dist/tool-system/builtin/agent-registry.d.ts +35 -4
- package/dist/tool-system/builtin/agent-transcript-translator.d.ts +22 -0
- package/dist/tool-system/builtin/skill-prompt.d.ts +7 -0
- package/dist/tool-system/builtin/skill.d.ts +3 -1
- package/dist/tool-system/context.d.ts +23 -0
- package/dist/tool-system/executor.d.ts +5 -1
- package/dist/tool-system/permission.d.ts +1 -1
- package/dist/tool-system/sandbox/index.d.ts +7 -0
- package/dist/tool-system/task-guard.d.ts +30 -0
- package/dist/types.d.ts +48 -0
- package/dist/ui/components/AgentBlock.d.ts +5 -2
- package/dist/ui/components/AgentDock.d.ts +36 -0
- package/dist/ui/components/CommandInput.d.ts +12 -1
- package/dist/ui/components/MessageRow.d.ts +54 -0
- package/dist/ui/components/SpinnerWithVerb.d.ts +7 -1
- package/dist/ui/components/StatusLine.d.ts +5 -1
- package/dist/ui/components/TextInput.d.ts +9 -1
- package/dist/ui/components/VirtualMessageList.d.ts +30 -11
- package/dist/ui/dev-seed.d.ts +1 -0
- package/dist/ui/fullscreen-mode.d.ts +9 -0
- package/dist/ui/hooks/useVirtualScroll.d.ts +101 -0
- package/dist/ui/perf-probes.d.ts +22 -0
- package/dist/ui/query-guard.d.ts +35 -0
- package/dist/ui/slice-anchor.d.ts +44 -0
- package/dist/ui/store.d.ts +26 -1
- package/package.json +5 -3
- package/dist/anthropic-UBSB5AQH.js +0 -1
- package/dist/arena-OW55ZCHT.js +0 -3
- package/dist/chunk-2NS3JMNK.js +0 -1
- package/dist/chunk-B7K2OWKC.js +0 -2
- package/dist/chunk-EWWK56K6.js +0 -2
- package/dist/chunk-KCXSARAA.js +0 -1
- package/dist/chunk-NMBYBGC7.js +0 -250
- package/dist/chunk-NVAZJ5XS.js +0 -2
- package/dist/chunk-PGANL6F2.js +0 -3
- package/dist/chunk-UDPUTFQT.js +0 -2
- package/dist/chunk-W47Z7MGS.js +0 -33
- package/dist/client-base-6ZZJJYDY.js +0 -1
- package/dist/compaction-ECVQVOCT.js +0 -1
- package/dist/devtools-SGDUOOM4.js +0 -1
- package/dist/manager-C3TDN6MS.js +0 -1
- package/dist/mcp-manager-OP4XYV53.js +0 -1
- package/dist/model-fetcher-BJ64META.js +0 -1
- package/dist/openai-KEWQ54TM.js +0 -1
- package/dist/openrouter-sync-5JNBL3Z6.js +0 -1
- package/dist/plugins/loader.d.ts +0 -72
- package/dist/skills/matcher.d.ts +0 -21
- package/dist/tool-summary-5UE62VU4.js +0 -2
- package/skills-builtin/codeshell-help.md +0 -135
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,114 @@ breaking.
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.3.0] - 2026-05-20
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
#### Hook system — Claude Code parity
|
|
16
|
+
|
|
17
|
+
The HookRegistry skeleton that landed earlier now has actual emit points,
|
|
18
|
+
result consumption, and two new ways for users to register handlers.
|
|
19
|
+
After this release, every event Claude Code exposes has a codeshell
|
|
20
|
+
equivalent that is actually emitted, handler return values are fully
|
|
21
|
+
consumed, and users can wire shell-command hooks via `settings.json` or
|
|
22
|
+
plugin `hooks.json` files.
|
|
23
|
+
|
|
24
|
+
- **New lifecycle emits.** `on_session_start`, `on_session_end`,
|
|
25
|
+
`user_prompt_submit`, `post_compact`, `on_permission_check`,
|
|
26
|
+
`notification`. The first three carry `messages`, `decision`, and
|
|
27
|
+
the new mutation fields into the conversation as a single
|
|
28
|
+
`<system-reminder>` block.
|
|
29
|
+
- **Decision semantics complete.** `pre_tool_use` handlers can now
|
|
30
|
+
return `decision: "allow"` to skip the PermissionClassifier entirely,
|
|
31
|
+
or `decision: "ask"` to route through ApprovalBackend with the
|
|
32
|
+
handler's messages threaded into the prompt description.
|
|
33
|
+
- **HookResult mutations.** New fields `updatedInput` (rewrite tool
|
|
34
|
+
args, re-validated against the schema), `additionalContext` (append
|
|
35
|
+
text to a successful tool's output), and `updatedPrompt` (replace the
|
|
36
|
+
user's prompt text on `user_prompt_submit`). Registry aggregation is
|
|
37
|
+
last-write-wins for input/prompt, newline-joined for additionalContext.
|
|
38
|
+
- **`settings.json` shell hooks.** New `hooks: [{event, command,
|
|
39
|
+
matcher?, timeout_ms?, cwd?}]` schema. Engine spawns the command per
|
|
40
|
+
emit with the CC wire protocol — stdin is the HookContext JSON,
|
|
41
|
+
stdout is a HookResult JSON, exit 2 = deny with stderr surfaced to
|
|
42
|
+
the model. `CODESHELL_HOOK_EVENT` / `CODESHELL_HOOK_CWD` env vars
|
|
43
|
+
are passed to the child; default 60s timeout with SIGTERM → SIGKILL
|
|
44
|
+
cleanup.
|
|
45
|
+
- **CC plugin `hooks.json` auto-load.** `loadPluginHooks` scans every
|
|
46
|
+
installed plugin's `hooks/hooks.json` and registers the
|
|
47
|
+
command-type entries. PascalCase event names (SessionStart,
|
|
48
|
+
UserPromptSubmit, PreToolUse, …) are mapped to codeshell's
|
|
49
|
+
snake_case. SubagentStop is dropped (codeshell doesn't surface that
|
|
50
|
+
event). `pluginCommandHook` normalizes the three known plugin
|
|
51
|
+
stdout shapes (`hookSpecificOutput.additionalContext`,
|
|
52
|
+
`additional_context`, `additionalContext`) into HookResult.messages.
|
|
53
|
+
- **`varRewrite` at install time.** Plugin trees materialized through
|
|
54
|
+
`installPlugin` get `${CLAUDE_PLUGIN_ROOT}` rewritten to
|
|
55
|
+
`${CODESHELL_PLUGIN_ROOT}` across every text file, so CC-authored
|
|
56
|
+
plugin scripts that branch on host detection pick the codeshell
|
|
57
|
+
path. `InstallResult.varRewrite` reports counts and `/plugin
|
|
58
|
+
install` prints a `rewrote: N file(s)` line so the modification is
|
|
59
|
+
visible.
|
|
60
|
+
- **`ToolContext.hooks`.** Tools that need to emit lifecycle events
|
|
61
|
+
(currently `notification` on background sub-agent terminal states)
|
|
62
|
+
reach the registry without going through Engine.
|
|
63
|
+
- **User guide.** `docs/hooks.md` documents the full event surface,
|
|
64
|
+
HookResult fields, shell protocol, priority chain, and CC migration
|
|
65
|
+
notes.
|
|
66
|
+
|
|
67
|
+
#### Arena
|
|
68
|
+
|
|
69
|
+
- `/arena-status` now reads `settings.arena.participants` and uses it
|
|
70
|
+
when present, mirroring how the actual Arena execution path already
|
|
71
|
+
resolves participants. Fixes a divergence where the diagnostic
|
|
72
|
+
preview showed the auto-derived pool while real runs used the
|
|
73
|
+
curated list.
|
|
74
|
+
|
|
75
|
+
### Changed
|
|
76
|
+
|
|
77
|
+
- **`isSubAgent` auto-merged into hook ctx.data.** All Engine-side
|
|
78
|
+
emits go through `Engine.emitHook` / `TurnLoop.emitHook`, which
|
|
79
|
+
injects `isSubAgent` (and `sessionId` for turn-loop) into
|
|
80
|
+
`ctx.data` so handlers can skip noisy injections for spawned
|
|
81
|
+
children with one consistent check.
|
|
82
|
+
- **`PermissionClassifier.handleAsk(toolName, args, reason?)`.** Third
|
|
83
|
+
arg is appended to the approval description so users see why a hook
|
|
84
|
+
asked for confirmation.
|
|
85
|
+
- **`hooks/events.ts` comment block** rewritten to reflect the
|
|
86
|
+
actual emit surface and the reserved-vs-emitted split.
|
|
87
|
+
- **`pluginCommandHook` child env strips `CLAUDE_PLUGIN_ROOT`.** A
|
|
88
|
+
CC-authored script that branches on `[ -n "$CLAUDE_PLUGIN_ROOT" ]`
|
|
89
|
+
now reliably picks the codeshell branch, regardless of whether the
|
|
90
|
+
parent shell happened to have that var set.
|
|
91
|
+
|
|
92
|
+
### Removed
|
|
93
|
+
|
|
94
|
+
- **In-tree superpowers injector** (`src/hooks/builtin/`). The CC
|
|
95
|
+
plugin `hooks.json` path is now authoritative: the superpowers
|
|
96
|
+
plugin's own `hooks/hooks.json` drives `SessionStart` injection of
|
|
97
|
+
the `using-superpowers` SKILL.md body. `preset.strictSkills` and the
|
|
98
|
+
`CODESHELL_STRICT_SKILLS` env switch are gone — toggle by uninstalling
|
|
99
|
+
the plugin or editing its `hooks.json`.
|
|
100
|
+
|
|
101
|
+
### Fixed
|
|
102
|
+
|
|
103
|
+
- **`agent-dock` test alignment.** The "blank-line between rows"
|
|
104
|
+
assertion was failing since the marginTop=1 was removed in favor of
|
|
105
|
+
a compact list; surviving invariants (both rows render, startedAt
|
|
106
|
+
order preserved) are kept.
|
|
107
|
+
- **Intentional unicode regex literals.** `INVISIBLE_CHARS` and
|
|
108
|
+
`FULLWIDTH_SPACE` in `api-key-sanitize.ts` deliberately contain
|
|
109
|
+
zero-width / CJK characters; ESLint flagged them as
|
|
110
|
+
`no-irregular-whitespace` errors. Annotated with inline disables.
|
|
111
|
+
|
|
112
|
+
## [0.2.0] - 2026-05-15
|
|
113
|
+
|
|
114
|
+
Capability layer + per-(provider, model) request-shape adapter. No
|
|
115
|
+
public API changes; meaningful enough architectural increment to
|
|
116
|
+
warrant a minor bump. (CHANGELOG was not maintained for this release;
|
|
117
|
+
see git log between v0.1.6 and v0.2.0 for the detailed change set.)
|
|
118
|
+
|
|
11
119
|
## [0.1.6] - 2026-05-13
|
|
12
120
|
|
|
13
121
|
### Added
|
package/README.md
CHANGED
|
@@ -108,6 +108,31 @@ Supported `agent` settings:
|
|
|
108
108
|
- `customSystemPrompt`
|
|
109
109
|
- `appendSystemPrompt`
|
|
110
110
|
|
|
111
|
+
### Fullscreen Mode
|
|
112
|
+
|
|
113
|
+
Codeshell defaults to **fullscreen** (alt-screen + ScrollBox). This is the
|
|
114
|
+
mode where window resize repaints cleanly — flow mode can show duplicate
|
|
115
|
+
content in the terminal's scrollback after a resize because the terminal
|
|
116
|
+
pushes the old viewport up before codeshell can erase it.
|
|
117
|
+
|
|
118
|
+
Opt out of fullscreen at startup with `CODESHELL_FULLSCREEN=0|false|off`,
|
|
119
|
+
or toggle at runtime with `/fullscreen off`. Flow mode lets the transcript
|
|
120
|
+
flow into the terminal's native scrollback (useful if you prefer keeping
|
|
121
|
+
shell history above codeshell visible).
|
|
122
|
+
|
|
123
|
+
### Stream Idle Watchdog (opt-in)
|
|
124
|
+
|
|
125
|
+
When `CODESHELL_ENABLE_STREAM_WATCHDOG=1`, the openai provider aborts any LLM
|
|
126
|
+
stream that has gone `CODESHELL_STREAM_IDLE_TIMEOUT_MS` ms (default `90000`)
|
|
127
|
+
without receiving a chunk. The engine then retries via the existing
|
|
128
|
+
`withRetry` policy, capped by `CODESHELL_STREAM_WATCHDOG_RETRIES` (default
|
|
129
|
+
`2`) attempts with exponential backoff.
|
|
130
|
+
|
|
131
|
+
This bounds upstream hangs at ~90 s instead of indefinitely. User-initiated
|
|
132
|
+
aborts (Esc / Ctrl+C) are never retried.
|
|
133
|
+
|
|
134
|
+
Disabled by default — set the flag explicitly to opt in.
|
|
135
|
+
|
|
111
136
|
## Built-in presets
|
|
112
137
|
|
|
113
138
|
| Preset | Purpose | Extra tools |
|
|
@@ -148,21 +173,29 @@ Design principles:
|
|
|
148
173
|
|
|
149
174
|
## Further Reading
|
|
150
175
|
|
|
176
|
+
- [CodeShell architecture documentation set](docs/architecture/README.md)
|
|
177
|
+
- [CodeShell architecture diagrams](docs/architecture/10-architecture-diagrams.md)
|
|
178
|
+
- [TUI Render 能力规划](docs/architecture/11-render-tui-capability-plan.md)
|
|
179
|
+
- [mac 端可视化客户端调研](docs/architecture/12-mac-visual-client-research.md)
|
|
151
180
|
- [CodeShell 当前架构与定位说明](docs/codeshell-repo-architecture.md)
|
|
152
181
|
|
|
153
182
|
## Project structure
|
|
154
183
|
|
|
155
184
|
```text
|
|
156
185
|
src/
|
|
157
|
-
├── cli/ # CLI entrypoints and
|
|
186
|
+
├── cli/ # CLI entrypoints, commands, onboarding, and output modes
|
|
158
187
|
├── context/ # Context compaction and window management
|
|
159
188
|
├── engine/ # Turn loop orchestration
|
|
160
189
|
├── hooks/ # Hook chain
|
|
161
190
|
├── llm/ # Model providers
|
|
162
191
|
├── preset/ # Built-in agent presets
|
|
163
192
|
├── prompt/ # Prompt composition
|
|
193
|
+
├── protocol/ # Agent client/server protocol
|
|
194
|
+
├── render/ # Custom Ink-like terminal renderer
|
|
195
|
+
├── run/ # Managed run lifecycle
|
|
164
196
|
├── session/ # Session persistence and memory
|
|
165
|
-
├── tool/
|
|
197
|
+
├── tool-system/ # Tool registry, execution, permissions, MCP
|
|
198
|
+
├── ui/ # Terminal UI components
|
|
166
199
|
└── index.ts # Public API exports
|
|
167
200
|
```
|
|
168
201
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as AnthropicClient}from'./chunk-X2S7ASQ2.js';import'./chunk-O5HFCH2U.js';import'./chunk-OWBYLMDD.js';import'./chunk-FU7AHZNN.js';import'./chunk-DI26OUIU.js';import'./chunk-3QP5BQ3L.js';
|
package/dist/arena/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{j as IterativeArena,f as defaultIterateConvergence,i as getIterateFormat,g as iterateCodeFormat,e as iterateDiffRatio,h as iterateDocumentFormat}from'../chunk-
|
|
1
|
+
export{j as IterativeArena,f as defaultIterateConvergence,i as getIterateFormat,g as iterateCodeFormat,e as iterateDiffRatio,h as iterateDocumentFormat}from'../chunk-K4HILJ6G.js';export{J as Arena,I as ArenaLedger,e as DiscussionStrategy,j as LENS_NAMES,S as MODEL_PRESETS,f as PlanningStrategy,d as ReviewStrategy,z as applyReviewResult,H as buildConsensus,u as buildDigest,i as buildLensPrompt,n as collectEvidence,W as createProgressRenderer,U as formatArenaResult,Y as formatArenaResultForSession,v as formatDigest,g as getLens,T as getMaxOutputTokens,k as getStrategy,l as getStrategyForPlan,p as hasTools,c as isStrategyV2,B as isTerminal,y as markUnderReview,A as markUnresolved,m as planArena,V as printArenaResult,s as registerClaims,X as renderProgress,x as resolveClaimStatus,h as resolveLenses,G as runAdjudication,D as runCrossReview,F as runDebateRounds,q as runParticipantResearch,r as runParticipantResearchWithDossiers,E as runVerificationReview,t as selectClaimsForReview,o as selectTools,w as transitionClaim,C as validTransitions}from'../chunk-WONQHE4P.js';import'../chunk-GKAQH2DG.js';import'../chunk-FU7AHZNN.js';import'../chunk-DI26OUIU.js';import'../chunk-3QP5BQ3L.js';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-MLCTC53I.js';import'./chunk-P6JSTIFM.js';import {c as c$1}from'./chunk-FZXY554D.js';import {W,X,J,Y,V,T as T$1,S as S$1}from'./chunk-WONQHE4P.js';export{Y as formatArenaResultForSession}from'./chunk-WONQHE4P.js';import'./chunk-GKAQH2DG.js';import'./chunk-FU7AHZNN.js';import'./chunk-DI26OUIU.js';import {h,a}from'./chunk-3QP5BQ3L.js';import l from'chalk';h();async function Q(e,s,a){let{models:n,mode:i,base:m,head:r,topic:t}=E(e),o=a?.output??(d=>console.log(d));if(!t){o(R());return}let f=j(s,n);if(f.length<2){o(L());return}let P=i?i.charAt(0).toUpperCase()+i.slice(1):"Auto";o(l.bold(`\u2550\u2550\u2550 Arena ${P} \u2550\u2550\u2550`)),o(l.dim(`Topic: ${t}`)),o(l.dim(`Models: ${f.map(d=>d.name).join(" vs ")}`));let x=a?.output?W(a.output):X,O=new J({participants:f,mode:i,enableContextTools:true,onProgress:x});try{let d=await O.run(t,{mode:i,base:m,head:r}),y=a?.outputMessage??a?.output;return y?y(Y(d)):V(d),d}catch(d){o(l.red(`Arena failed: ${d.message}`));return}}a(Q,"runArenaReview");function T(e){let s=new a$1;try{let a=new c$1(process.cwd()).get();if(a.models?.length)for(let n of a.models)s.register({key:n.key,label:n.label,provider:n.provider??"",model:n.model,baseUrl:n.baseUrl??e.llm.baseUrl,apiKey:n.apiKey??e.llm.apiKey,maxOutputTokens:n.maxOutputTokens});}catch{}return s}a(T,"buildModelPool");function K(e,s,a){if(typeof e=="string"){let n=s.get(e);return n?{name:n.label??c(n.model),llm:{provider:n.provider,model:n.model,apiKey:n.apiKey??a.llm.apiKey,baseUrl:n.baseUrl??a.llm.baseUrl,temperature:.3,maxTokens:n.maxOutputTokens??T$1(n.model),enableStreaming:false}}:void 0}return {name:e.name,llm:{provider:e.provider??a.llm.provider,model:e.model,apiKey:e.apiKey??a.llm.apiKey,baseUrl:e.baseUrl??a.llm.baseUrl,temperature:.3,maxTokens:T$1(e.model),enableStreaming:false}}}a(K,"resolveOneParticipant");function j(e,s){let a=T(e);if(s)return s.split(",").map(r=>r.trim().toLowerCase()).map(r=>{let t=a.get(r);if(t)return {name:t.label??c(t.model),llm:{provider:t.provider,model:t.model,apiKey:t.apiKey??e.llm.apiKey,baseUrl:t.baseUrl??e.llm.baseUrl,temperature:.3,maxTokens:t.maxOutputTokens??T$1(t.model),enableStreaming:false}};let o=S$1[r];return o?{name:c(o.model),llm:{provider:o.provider,model:o.model,apiKey:e.llm.apiKey,baseUrl:e.llm.baseUrl,temperature:.3,maxTokens:o.maxOutputTokens,enableStreaming:false}}:{name:c(r),llm:{...e.llm,model:r,enableStreaming:false}}});let n=new c$1(process.cwd()).get();if(n.arena?.participants?.length>=2){let m=n.arena.participants.map(r=>K(r,a,e)).filter(r=>r!==void 0);if(m.length>=2)return m}let i=[{name:c(e.llm.model),llm:{...e.llm,maxTokens:T$1(e.llm.model),enableStreaming:false}}];if(e.llm.baseUrl?.includes("openrouter")){let r=e.llm.model.includes("claude")?"openai/gpt-5.4":"anthropic/claude-opus-4.6";i.push({name:c(r),llm:{...e.llm,model:r,maxTokens:T$1(r),enableStreaming:false}});}return i}a(j,"resolveParticipants");var S=["review","discussion","planning"];function E(e){let s,a,n,i,m=[],r=e.split(/\s+/);for(let t=0;t<r.length;t++)if(r[t]==="--models"&&r[t+1])s=r[++t];else if(r[t]==="--mode"&&r[t+1]){let o=r[++t].toLowerCase();S.includes(o)?a=o:console.log(l.yellow(` Unknown mode "${o}", valid: ${S.join(", ")}`));}else r[t]==="--base"&&r[t+1]?n=r[++t]:r[t]==="--head"&&r[t+1]?i=r[++t]:m.push(r[t]);return {models:s,mode:a,base:n,head:i,topic:m.join(" ").trim()}}a(E,"parseFlags");function R(){return [l.bold("Arena \u2014 Multi-model collaborative analysis"),"",l.dim("Usage:")," /arena review the authentication module"," /arena --models claude,gpt4o is the error handling correct?"," /arena --mode planning design the new auth system"," /arena --mode discussion should we use REST or GraphQL"," /arena --base main review changes since main",' code-shell arena "review my latest changes"',"",`${l.dim("Modes:")} review (default), discussion, planning`,l.dim("Mode is auto-detected from the topic if --mode is not specified."),"",l.dim("Flags:")," --base <ref> Base branch/ref for comparison"," --head <ref> Head branch/ref (default: HEAD)","",`${l.dim("Available model presets:")} ${Object.keys(S$1).join(", ")}`].join(`
|
|
2
|
+
`)}a(R,"formatUsage");function L(e){return [l.red("Arena needs at least 2 models."),"","Use --models to specify:"," /arena --models claude,gpt4o review the code","","Or configure in ~/.code-shell/settings.json:",' "arena": { "participants": [',' { "name": "Claude", "model": "anthropic/claude-sonnet-4-20250514" },',' { "name": "GPT-4o", "model": "openai/gpt-4o" }'," ]}"].join(`
|
|
3
|
+
`)}a(L,"formatModelHelp");function c(e){return (e.split("/").pop()??e).replace(/-\d.*$/,"").split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}a(c,"modelDisplayName");export{Q as runArenaReview};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$1,c,b as b$1}from'./chunk-P6JSTIFM.js';import {h,a}from'./chunk-3QP5BQ3L.js';import {existsSync,readFileSync}from'fs';import {fileURLToPath}from'url';import {dirname,join}from'path';h();h();var _=/(?:^|[-_/])(?:embed(?:ding)?|whisper|tts|audio|image|dall-?e|moderation|rerank|guard|vision-only|realtime|transcribe|search-preview|search-api|sora|computer-use|deep-research|codex|chat-latest)(?:$|[-_/])/i,N=a(e=>e.startsWith("ft:"),"isFineTunedId"),K=a(e=>/-\d{4}-\d{2}-\d{2}$/.test(e),"isDatedSnapshotId"),l=a(e=>!_.test(e)&&!N(e)&&!K(e),"isChatLike"),u=a(e=>e?{Authorization:`Bearer ${e}`}:{},"bearer"),f={openai:{label:"OpenAI",defaultBaseUrl:"https://api.openai.com/v1",modelsPath:"/models",protocol:"openai-compat",authHeader:u,chatFilter:l},anthropic:{label:"Anthropic",defaultBaseUrl:"https://api.anthropic.com/v1",modelsPath:"/models",protocol:"anthropic-style",authHeader:a(e=>e?{"x-api-key":e,"anthropic-version":"2023-06-01"}:{"anthropic-version":"2023-06-01"},"authHeader"),chatFilter:l},deepseek:{label:"DeepSeek",defaultBaseUrl:"https://api.deepseek.com/v1",modelsPath:"/models",protocol:"openai-compat",authHeader:u,chatFilter:l},zai:{label:"Z.AI (GLM)",defaultBaseUrl:"https://api.z.ai/api/paas/v4",modelsPath:"/models",protocol:"openai-compat",authHeader:u,chatFilter:l},xai:{label:"xAI (Grok)",defaultBaseUrl:"https://api.x.ai/v1",modelsPath:"/models",protocol:"openai-compat",authHeader:u,chatFilter:l},mistral:{label:"Mistral",defaultBaseUrl:"https://api.mistral.ai/v1",modelsPath:"/models",protocol:"openai-compat",authHeader:u,chatFilter:l},groq:{label:"Groq",defaultBaseUrl:"https://api.groq.com/openai/v1",modelsPath:"/models",protocol:"openai-compat",authHeader:u,chatFilter:l},google:{label:"Google Gemini",defaultBaseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",modelsPath:"https://generativelanguage.googleapis.com/v1beta/models",protocol:"gemini",authHeader:u,authQuery:a(e=>e?{key:e}:{},"authQuery"),chatFilter:a(e=>l(e)&&/gemini/i.test(e),"chatFilter")},openrouter:{label:"OpenRouter",defaultBaseUrl:"https://openrouter.ai/api/v1",modelsPath:"/models",protocol:"openai-compat",authHeader:u,chatFilter:l},ollama:{label:"Ollama (local)",defaultBaseUrl:"http://localhost:11434",modelsPath:"/api/tags",protocol:"ollama",authHeader:a(()=>({}),"authHeader"),chatFilter:l},custom:{label:"Custom",defaultBaseUrl:"",modelsPath:"/models",protocol:"openai-compat",authHeader:u,chatFilter:l}};function O(e){return f[e]??f.custom}a(O,"getKindMeta");h();var L={fetchedAt:"2026-05-14",source:"https://api-docs.deepseek.com/quick_start/pricing",count:4,models:[{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",contextLength:1e6,maxOutputTokens:384e3,inputPricePerMillion:1.74,outputPricePerMillion:3.48,modalities:["text"],thinking:true},{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash",contextLength:1e6,maxOutputTokens:384e3,inputPricePerMillion:.14,outputPricePerMillion:.28,modalities:["text"],thinking:true},{id:"deepseek-chat",name:"DeepSeek Chat (legacy, deprecating)",contextLength:128e3,maxOutputTokens:8192,inputPricePerMillion:.14,outputPricePerMillion:.28,modalities:["text"]},{id:"deepseek-reasoner",name:"DeepSeek Reasoner (legacy, deprecating)",contextLength:128e3,maxOutputTokens:8192,inputPricePerMillion:.14,outputPricePerMillion:.28,modalities:["text"],thinking:true}]};var S={fetchedAt:"2026-05-14",source:"https://docs.z.ai/guides/llm/glm-5.1 + https://docs.z.ai/guides/overview/pricing",count:5,models:[{id:"glm-5.1",name:"GLM-5.1",contextLength:2e5,maxOutputTokens:128e3,inputPricePerMillion:1.4,outputPricePerMillion:4.4,modalities:["text"],thinking:true},{id:"glm-4.6",name:"GLM-4.6",contextLength:2e5,maxOutputTokens:128e3,inputPricePerMillion:.6,outputPricePerMillion:2.2,modalities:["text"],thinking:true},{id:"glm-4.5",name:"GLM-4.5",contextLength:128e3,maxOutputTokens:96e3,inputPricePerMillion:.6,outputPricePerMillion:2.2,modalities:["text"],thinking:true},{id:"glm-4.5-air",name:"GLM-4.5 Air",contextLength:128e3,maxOutputTokens:96e3,inputPricePerMillion:.2,outputPricePerMillion:1.1,modalities:["text"],thinking:true},{id:"glm-4.5-flash",name:"GLM-4.5 Flash (free tier)",contextLength:128e3,maxOutputTokens:96e3,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]}]};var v={fetchedAt:"2026-05-15",source:"OpenRouter model pages (openrouter.ai/openai/*) + developers.openai.com docs. OpenRouter mirrors OpenAI's published context/output limits per variant.",count:18,models:[{id:"gpt-5.5",name:"GPT-5.5",contextLength:922e3,maxOutputTokens:128e3,inputPricePerMillion:5,outputPricePerMillion:30,modalities:["text","image"],thinking:true},{id:"gpt-5.5-pro",name:"GPT-5.5 Pro",contextLength:922e3,maxOutputTokens:128e3,inputPricePerMillion:30,outputPricePerMillion:180,modalities:["text","image"],thinking:true},{id:"gpt-5.4",name:"GPT-5.4",contextLength:922e3,maxOutputTokens:128e3,inputPricePerMillion:2.5,outputPricePerMillion:15,modalities:["text","image"],thinking:true},{id:"gpt-5.4-pro",name:"GPT-5.4 Pro",contextLength:922e3,maxOutputTokens:128e3,inputPricePerMillion:30,outputPricePerMillion:180,modalities:["text","image"],thinking:true},{id:"gpt-5.4-mini",name:"GPT-5.4 Mini",contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:.75,outputPricePerMillion:4.5,modalities:["text","image"],thinking:true},{id:"gpt-5.4-nano",name:"GPT-5.4 Nano",contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:.2,outputPricePerMillion:1.25,modalities:["text","image"],thinking:true},{id:"gpt-5.2",name:"GPT-5.2",contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:1.75,outputPricePerMillion:14,modalities:["text","image"],thinking:true},{id:"gpt-5.2-pro",name:"GPT-5.2 Pro",contextLength:4e5,maxOutputTokens:128e3,modalities:["text","image"],thinking:true},{id:"gpt-5.1",name:"GPT-5.1",contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:1.25,outputPricePerMillion:10,modalities:["text","image"],thinking:true},{id:"gpt-5",name:"GPT-5",contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:1.25,outputPricePerMillion:10,modalities:["text","image"],thinking:true},{id:"gpt-5-pro",name:"GPT-5 Pro",contextLength:4e5,maxOutputTokens:128e3,modalities:["text","image"],thinking:true},{id:"gpt-5-mini",name:"GPT-5 Mini",contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:.25,outputPricePerMillion:2,modalities:["text","image"],thinking:true},{id:"gpt-5-nano",name:"GPT-5 Nano",contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:.05,outputPricePerMillion:.4,modalities:["text","image"],thinking:true},{id:"gpt-4.1",name:"GPT-4.1",contextLength:1e6,maxOutputTokens:32768,modalities:["text","image"]},{id:"gpt-4.1-mini",name:"GPT-4.1 Mini",contextLength:1e6,maxOutputTokens:32768,modalities:["text","image"]},{id:"o3",name:"o3",contextLength:2e5,maxOutputTokens:1e5,inputPricePerMillion:2,outputPricePerMillion:8,modalities:["text","image"],thinking:true},{id:"o3-pro",name:"o3-pro",contextLength:2e5,maxOutputTokens:1e5,modalities:["text","image"],thinking:true},{id:"o4-mini",name:"o4-mini",contextLength:2e5,maxOutputTokens:1e5,inputPricePerMillion:1.1,outputPricePerMillion:4.4,modalities:["text","image"],thinking:true}]};var b={fetchedAt:"2026-05-15",source:"https://ai.google.dev/gemini-api/docs/models + https://ai.google.dev/gemini-api/docs/gemini-3",count:6,models:[{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro (preview)",contextLength:1048576,maxOutputTokens:65536,modalities:["text","image","audio","video"],thinking:true},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro (preview)",contextLength:1048576,maxOutputTokens:65536,modalities:["text","image","audio","video"],thinking:true},{id:"gemini-3.1-flash-lite",name:"Gemini 3.1 Flash-Lite",contextLength:1048576,maxOutputTokens:65536,modalities:["text","image","audio","video"],thinking:true},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash (preview)",contextLength:1048576,maxOutputTokens:65536,modalities:["text","image","audio","video"],thinking:true},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro",contextLength:1048576,maxOutputTokens:65536,inputPricePerMillion:1.25,outputPricePerMillion:10,modalities:["text","image","audio","video"],thinking:true},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash",contextLength:1e6,maxOutputTokens:65536,inputPricePerMillion:.3,outputPricePerMillion:2.5,modalities:["text","image","audio","video"],thinking:true},{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash-Lite",contextLength:1e6,maxOutputTokens:65536,modalities:["text","image","audio","video"],thinking:true}]};var w={deepseek:L,zai:S,openai:v,google:b};function P(e){return w[e]?.models??[]}a(P,"listStaticModels");function x(e){return w[e]!==void 0}a(x,"hasStaticCatalog");var q=dirname(fileURLToPath(import.meta.url)),y=join(q,"..","data","openrouter-models.json");async function Me(e,i){let a=O(e.kind);if(!i.refresh){let n=a$1(i.cacheDir,e.key);if(n&&!c(n))return {...n,fromCache:true}}if(e.kind==="openrouter")return W(e.key,i.cacheDir);try{let n=e.modelsPath??a.modelsPath,t=new URL(Z(e.baseUrl,n)),s=a.authHeader(e.apiKey??"");if(a.authQuery){let p=a.authQuery(e.apiKey??"");for(let[A,C]of Object.entries(p))t.searchParams.set(A,C);}let o=await fetch(t.toString(),{headers:{Accept:"application/json",...s},signal:AbortSignal.timeout(i.timeoutMs??2e4)});if(!o.ok){let p=o.status===401||o.status===403;return d(e.key,i.cacheDir,`HTTP ${o.status}`,p?void 0:e.kind)}let m=await o.json(),R=V(m,a.protocol).filter(p=>a.chatFilter(p.id)),G=Q(R),F=J(e.kind,G);return b$1(i.cacheDir,e.key,F)}catch(n){let t=n.message||String(n);return d(e.key,i.cacheDir,t,e.kind)}}a(Me,"fetchModelList");function J(e,i){if(!x(e))return i;let a=P(e),n=new Map(a.map(o=>[o.id,o])),t=new Set(i.map(o=>o.id)),s=i.map(o=>{let m=n.get(o.id);return m?{id:o.id,contextLength:o.contextLength>0?o.contextLength:m.contextLength,maxOutputTokens:o.maxOutputTokens>0?o.maxOutputTokens:m.maxOutputTokens}:o});for(let o of a)t.has(o.id)||s.push({id:o.id,contextLength:o.contextLength,maxOutputTokens:o.maxOutputTokens});return s}a(J,"enrichFromStaticCatalog");function Q(e){let i=a(a=>{let n=a.match(/(?:^|[^\d])(\d+\.\d+)(?!\d)/);if(n)return Number(n[1]);let t=a.match(/(?:^|[^\d])(\d{1,2})-(\d{1,2})(?!\d)/);if(t)return +`${t[1]}.${t[2]}`;let s=a.match(/(?:^|[^\d])(\d{1,2})(?!\d)/);return s?Number(s[1]):-1},"versionOf");return [...e].sort((a,n)=>{let t=i(a.id),s=i(n.id);return t!==s?s-t:a.id.length!==n.id.length?a.id.length-n.id.length:a.id.localeCompare(n.id)})}a(Q,"sortByRecency");function V(e,i){switch(i){case "ollama":return (e.models??[]).map(t=>({id:t.name,contextLength:0,maxOutputTokens:0}));case "anthropic-style":return (e.data??[]).map(t=>({id:t.id,contextLength:t.context_window??2e5,maxOutputTokens:t.max_output_tokens??0}));case "gemini":return (e.models??[]).map(t=>({id:t.name.replace(/^models\//,""),contextLength:t.inputTokenLimit??0,maxOutputTokens:t.outputTokenLimit??0}));case "openai-compat":return (e.data??[]).map(t=>({id:t.id,contextLength:t.context_window??t.context_length??0,maxOutputTokens:t.max_completion_tokens??0}))}return i}a(V,"normalize");function W(e,i){if(!existsSync(y))return d(e,i,"openrouter snapshot missing");try{let n=(JSON.parse(readFileSync(y,"utf-8")).models??[]).map(t=>({id:t.id,contextLength:t.contextLength??0,maxOutputTokens:t.maxOutputTokens??0}));return b$1(i,e,n)}catch(a){return d(e,i,a.message)}}a(W,"loadOpenRouterSnapshot");function d(e,i,a,n){let t=a$1(i,e);if(t)return {...t,error:a,fromCache:true};if(n&&x(n)){let s=P(n).map(o=>({id:o.id,contextLength:o.contextLength,maxOutputTokens:o.maxOutputTokens}));return {fetchedAt:new Date().toISOString(),providerKey:e,models:s,error:a}}return {fetchedAt:new Date().toISOString(),providerKey:e,models:[],error:a}}a(d,"errorResult");function Z(e,i){return !e||/^https?:\/\//i.test(i)?i:`${e.replace(/\/$/,"")}${i.startsWith("/")?"":"/"}${i}`}a(Z,"joinUrl");
|
|
2
|
+
export{f as a,Me as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {T,ga}from'./chunk-Z5HKHAO7.js';import {h,a}from'./chunk-3QP5BQ3L.js';import {join}from'path';import {homedir}from'os';h();h();function l(e){let o=e.runsDir??join(homedir(),".code-shell","runs"),u=new T(o);return new ga({store:u,executor:{llm:e.llm,maxTurns:e.maxTurns??30,maxContextTokens:e.maxContextTokens??2e5,permissionMode:e.permissionMode??"acceptEdits",sessionStorageDir:e.sessionStorageDir,mcpServers:e.mcpServers,enabledBuiltinTools:e.enabledBuiltinTools,disabledBuiltinTools:e.disabledBuiltinTools,customSystemPrompt:e.customSystemPrompt,appendSystemPrompt:e.appendSystemPrompt,hooks:e.hooks},concurrency:e.concurrency??1,runsDir:o,evaluator:e.evaluator,defaultTags:e.defaultTags,defaultMetadata:e.defaultMetadata})}a(l,"createRunManager");export{l as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-GKAQH2DG.js';import {h,a as a$1}from'./chunk-3QP5BQ3L.js';h();var a="https://openrouter.ai/api/v1/models";function c(t){if(!t)return 0;let e=Number(t);return Number.isFinite(e)?e*1e6:0}a$1(c,"priceToPerMillion");function p(t){return {id:t.id,name:t.name??t.id,created:t.created??0,contextLength:t.top_provider?.context_length??t.context_length??0,maxOutputTokens:t.top_provider?.max_completion_tokens??0,inputPricePerMillion:c(t.pricing?.prompt),outputPricePerMillion:c(t.pricing?.completion),modalities:t.architecture?.input_modalities??[]}}a$1(p,"slim");async function f(t=15e3){try{let e=await fetch(a,{headers:{Accept:"application/json"},signal:AbortSignal.timeout(t)});if(!e.ok)return {ok:!1,count:0,error:`HTTP ${e.status} ${e.statusText}`};let r=((await e.json()).data??[]).map(p).sort((s,u)=>u.created-s.created);return a$2({fetchedAt:new Date().toISOString(),source:a,count:r.length,models:r}),{ok:!0,count:r.length}}catch(e){return {ok:false,count:0,error:e.message}}}a$1(f,"syncOpenRouterCatalog");
|
|
2
2
|
export{f as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
`)||"(no output)"}),
|
|
1
|
+
import {d}from'./chunk-DI26OUIU.js';import {h,a}from'./chunk-3QP5BQ3L.js';import {Client}from'@modelcontextprotocol/sdk/client/index.js';import {StdioClientTransport}from'@modelcontextprotocol/sdk/client/stdio.js';import {StreamableHTTPClientTransport}from'@modelcontextprotocol/sdk/client/streamableHttp.js';h();var m=class p{constructor(t){this.toolRegistry=t;p.instance=this;}static{a(this,"MCPManager");}static instance=null;connections=new Map;static getInstance(){if(!p.instance)throw new Error("MCPManager not initialized. Connect to servers first.");return p.instance}async connectAll(t){let e=Object.entries(t);if(e.length===0)return;let s=await Promise.allSettled(e.map(([r,n])=>this.connect(r,n)));for(let r=0;r<s.length;r++){let n=s[r];n.status==="rejected"&&d.warn("mcp.connect_failed",{server:e[r][0],error:n.reason.message});}}async connect(t,e){if(this.connections.has(t)){d.info("mcp.already_connected",{server:t});return}d.info("mcp.connecting",{server:t,transport:e.transport??"stdio"});let s=new Client({name:"code-shell",version:"0.1.0"},{capabilities:{}}),r,n=e.transport??"stdio";if(n==="stdio"){if(!e.command)throw new Error(`MCP server "${t}": command is required for stdio transport`);r=new StdioClientTransport({command:e.command,args:e.args,env:e.env?{...process.env,...e.env}:void 0});}else if(n==="streamable-http"||n==="sse"){if(!e.url)throw new Error(`MCP server "${t}": url is required for ${n} transport`);r=new StreamableHTTPClientTransport(new URL(e.url),{requestInit:e.headers?{headers:e.headers}:void 0});}else throw new Error(`MCP server "${t}": unsupported transport "${n}"`);let i=15e3,o;try{await new Promise((l,c)=>{o=setTimeout(()=>{c(new Error(`MCP server "${t}" connect timed out after ${i}ms`));},i),s.connect(r).then(()=>l(),f=>c(f));});}catch(l){try{await r.close?.();}catch{}throw l}finally{o&&clearTimeout(o);}this.connections.set(t,{client:s,serverName:t,transport:r}),await this.discoverTools(t,s),d.info("mcp.connected",{server:t});}async discoverTools(t,e){let s=await e.listTools();for(let r of s.tools){let n={name:`mcp_${t}_${r.name}`,description:`[${t}] ${r.description??r.name}`,inputSchema:r.inputSchema??{type:"object",properties:{}},source:"mcp",serverName:t,permissionDefault:"ask",isConcurrencySafe:true,isReadOnly:false};this.toolRegistry.registerTool(n,async i=>{let o=await e.callTool({name:r.name,arguments:i}),l=[];if(Array.isArray(o.content))for(let c of o.content)typeof c=="object"&&c!==null&&"text"in c?l.push(String(c.text)):typeof c=="string"&&l.push(c);return l.join(`
|
|
2
|
+
`)||"(no output)"}),d.info("mcp.tool_registered",{server:t,tool:n.name});}}async disconnectAll(){for(let[t,e]of this.connections)try{await e.client.close(),d.info("mcp.disconnected",{server:t});}catch(s){d.warn("mcp.disconnect_error",{server:t,error:s.message});}this.connections.clear();}listServers(){return [...this.connections.keys()]}async callTool(t,e,s){let r=this.connections.get(t);if(!r)throw new Error(`MCP server "${t}" is not connected.`);let n=await r.client.callTool({name:e,arguments:s}),i=[];if(Array.isArray(n.content))for(let o of n.content)typeof o=="object"&&o!==null&&"text"in o?i.push(String(o.text)):typeof o=="string"&&i.push(o);return i.join(`
|
|
3
3
|
`)||"(no output)"}async listResources(t){let e=[],s=t?[t]:[...this.connections.keys()];for(let r of s){let n=this.connections.get(r);if(n)try{let i=await n.client.listResources();for(let o of i.resources)e.push({uri:o.uri,name:o.name??o.uri,description:o.description});}catch{}}return e}async readResource(t,e){let s=this.connections.get(t);if(!s)throw new Error(`MCP server "${t}" is not connected.`);let r=await s.client.readResource({uri:e}),n=[];if(Array.isArray(r.contents))for(let i of r.contents)typeof i=="object"&&i!==null&&"text"in i&&n.push(String(i.text));return n.join(`
|
|
4
4
|
`)||"(no content)"}};export{m as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {h as h$1,a as a$1}from'./chunk-3QP5BQ3L.js';import {existsSync,mkdirSync,appendFileSync,readdirSync,unlinkSync}from'fs';import {join}from'path';import {homedir}from'os';import {AsyncLocalStorage}from'async_hooks';h$1();var l={debug:0,info:1,warn:2,error:3},g=join(homedir(),".code-shell","logs"),L=7,C=100,O=new Set(["ui","ink","render","stream"]);function F(n,e){let r=(n??e??"").toLowerCase();return O.has(r)?"ui-ink":"engine"}a$1(F,"routeBucket");function A(){return process.env.CODE_SHELL_DEV==="1"||process.argv.includes("--debug")||process.argv.includes("-d")||process.argv.some(e=>e.startsWith("--debug="))?true:process.env.NODE_ENV==="test"||process.env.BUN_TEST==="1"||process.argv.some(e=>e.includes("/tests/")||e.endsWith(".test.ts"))?false:!!(process.argv[1]??"").includes("/src/")}a$1(A,"isLocalDev");function M(){let n=process.env.CODE_SHELL_LOG_LEVEL?.toLowerCase().trim();return n&&Object.hasOwn(l,n)?n:A()?"debug":"info"}a$1(M,"resolveDefaultLevel");function $(){let n=process.argv.find(t=>t.startsWith("--debug=")),e;if(n)e=n.slice(8);else {let t=process.env.CODE_SHELL_DEBUG;t&&t!=="1"&&t!=="true"&&(e=t);}if(!e)return null;let r=new Set(e.split(",").map(t=>t.trim().toLowerCase()).filter(Boolean));return r.size>0?r:null}a$1($,"resolveCategoryFilter");var w=new AsyncLocalStorage,S=`${Date.now()}-${Math.random().toString(36).slice(2,8)}`;function N(n){S=n;}a$1(N,"setCurrentSid");function h(){return w.getStore()??S}a$1(h,"getCurrentSid");function U(n,e){return w.run(n,e)}a$1(U,"runWithSid");var a=[];var d=class n{constructor(e={}){this.context=e;this.enabled=process.env.CODE_SHELL_LOG!=="0",this.minLevel=M(),this.categoryFilter=$(),this.stderrEcho=process.env.CODE_SHELL_DEBUG==="1"||process.argv.includes("--debug-to-stderr")||process.argv.includes("-d2e");}static{a$1(this,"Logger");}enabled;minLevel;categoryFilter;stderrEcho;dirReady=false;child(e){return new n({...this.context,...e})}setSid(e){N(e);}getSid(){return h()}debug(e,r){this.write("debug",e,r);}info(e,r){this.write("info",e,r);}warn(e,r){this.write("warn",e,r);}error(e,r){let t,o;typeof e=="string"?(t=e,r instanceof Error?(o={error:r.message,stack:r.stack}):o=r):e instanceof Error?(t=e.message,o={stack:e.stack}):t=String(e),this.recordError(t,o),this.write("error",t,o);}recordError(e,r){a.length>=C&&a.shift(),a.push({msg:e,t:new Date().toISOString(),data:r});}write(e,r,t){if(!this.enabled||l[e]<l[this.minLevel])return;let o=t?.cat??this.context.cat;if(e==="debug"&&this.categoryFilter&&(!o||!this.categoryFilter.has(o.toLowerCase())))return;let s=new Date().toISOString(),c={t:s,l:e,msg:r,...this.context};o&&!c.cat&&(c.cat=o),c.sid===void 0&&(c.sid=h()),t&&(c.d=t);let u=JSON.stringify(c)+`
|
|
2
|
+
`;if(this.stderrEcho){process.stderr.write(u);return}try{this.dirReady||(existsSync(g)||mkdirSync(g,{recursive:!0}),this.dirReady=!0);let y=s.slice(0,10),k=F(o,this.context.cat),E=join(g,`${k}-${y}.log`);appendFileSync(E,u,"utf-8");}catch{}}getMinLevel(){return this.minLevel}isCategoryActive(e){return !this.categoryFilter||this.categoryFilter.has(e.toLowerCase())}span(e,r){let t=Date.now();return this.write("debug",`${e}.begin`,r),{end:a$1(o=>{let s=Date.now()-t;this.write("info",`${e}.end`,{...r,...o,duration_ms:s});},"end"),fail:a$1((o,s)=>{let c=Date.now()-t,u=o instanceof Error?o.message:String(o);this.write("error",`${e}.fail`,{...r,...s,duration_ms:c,error:u});},"fail")}}},X=new d;function z(){try{if(!existsSync(g))return;let n=readdirSync(g).filter(e=>e.endsWith(".log")).sort();if(n.length<=L)return;for(let e of n.slice(0,n.length-L))try{unlinkSync(join(g,e));}catch{}}catch{}}a$1(z,"rotateLogs");export{N as a,h as b,U as c,X as d,z as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {h,a}from'./chunk-3QP5BQ3L.js';import {existsSync,readFileSync,copyFileSync,writeFileSync,mkdirSync,renameSync}from'fs';import {join,dirname}from'path';import {homedir}from'os';import {z}from'zod';h();h();var C=z.object({agent:z.object({preset:z.string().default("terminal-coding"),enabledBuiltinTools:z.array(z.string()).default([]),disabledBuiltinTools:z.array(z.string()).default([]),customSystemPrompt:z.string().optional(),appendSystemPrompt:z.string().optional()}).default({}),activeKey:z.string().optional(),autoUpdates:z.boolean().default(true),model:z.object({provider:z.string().default("openai"),name:z.string().default("anthropic/claude-opus-4-6"),apiKey:z.string().optional(),baseUrl:z.string().default("https://openrouter.ai/api/v1"),temperature:z.number().min(0).max(2).default(.3),maxTokens:z.number().default(8192)}).default({}),providers:z.array(z.object({key:z.string(),label:z.string().optional(),kind:z.enum(["openai","anthropic","deepseek","zai","xai","mistral","groq","google","openrouter","ollama","custom"]),baseUrl:z.string(),apiKey:z.string().optional(),protocol:z.enum(["openai-compat","anthropic-style"]).optional(),modelsPath:z.string().optional(),thinking:z.enum(["enabled","disabled"]).optional()})).default([]),models:z.array(z.object({key:z.string(),label:z.string().optional(),providerKey:z.string().optional(),model:z.string(),maxOutputTokens:z.number().optional(),maxContextTokens:z.number().optional(),protocol:z.string().optional(),provider:z.string().optional(),baseUrl:z.string().optional(),apiKey:z.string().optional(),thinking:z.enum(["enabled","disabled"]).optional()}).transform(r=>{let o=r.protocol??r.provider;return {...r,protocol:o,provider:o}})).default([]),permissions:z.object({defaultMode:z.enum(["default","acceptEdits","dontAsk","bypassPermissions","auto","plan"]).default("default"),rules:z.array(z.object({tool:z.string(),argsPattern:z.record(z.string()).optional(),decision:z.enum(["allow","deny","ask"]),reason:z.string().optional()})).default([])}).default({}),context:z.object({maxTokens:z.number().default(2e5),compactAtRatio:z.number().default(.6),summarizeAtRatio:z.number().default(.8)}).default({}),session:z.object({storageDir:z.string().optional(),maxHistory:z.number().default(100)}).default({}),mcpServers:z.record(z.object({name:z.string(),command:z.string().optional(),args:z.array(z.string()).optional(),env:z.record(z.string()).optional(),url:z.string().optional(),transport:z.enum(["stdio","sse","streamable-http","inprocess"]).optional(),headers:z.record(z.string()).optional()})).default({}),instructions:z.object({fileName:z.string().default("CODESHELL.md"),scanDirs:z.array(z.string()).default([]),compatFileNames:z.array(z.string()).default(["CLAUDE.md","AGENTS.md"]),ignoreGitBoundary:z.boolean().default(false)}).default({}),arena:z.object({participants:z.array(z.union([z.string(),z.object({name:z.string(),model:z.string(),provider:z.string().optional(),apiKey:z.string().optional(),baseUrl:z.string().optional()})])).default([])}).default({}),search:z.object({provider:z.enum(["serper","tavily","searxng"]).default("serper"),apiKey:z.string().optional(),baseUrl:z.string().optional()}).default({}),output:z.object({format:z.enum(["text","json","jsonl","stream-json"]).default("text")}).default({}),sandbox:z.object({mode:z.enum(["off","auto","seatbelt","bwrap"]).optional(),writableRoots:z.array(z.string()).optional(),deniedReads:z.array(z.string()).optional(),network:z.enum(["allow","deny"]).optional()}).optional(),hooks:z.array(z.object({event:z.string(),command:z.string().min(1),matcher:z.string().optional(),timeout_ms:z.number().int().positive().optional(),cwd:z.string().optional()})).optional()}).passthrough();function x(r){return C.parse(r)}a(x,"validateSettings");h();var N=[[/deepseek\.com/i,"deepseek"],[/z\.ai/i,"zai"],[/anthropic\.com/i,"anthropic"],[/openai\.com/i,"openai"],[/x\.ai/i,"xai"],[/mistral\.ai/i,"mistral"],[/groq\.com/i,"groq"],[/generativelanguage\.googleapis/i,"google"],[/openrouter\.ai/i,"openrouter"],[/localhost:11434|127\.0\.0\.1:11434/i,"ollama"]];function S(r){if(!r)return "custom";for(let[o,n]of N)if(o.test(r))return n;return "custom"}a(S,"inferKind");function M(r){return `${r.provider??""}|${r.baseUrl??""}|${r.apiKey??""}`}a(M,"makeFingerprint");function L(r,o){if(!o.has(r))return r;for(let n=2;;n++){let i=`${r}-${n}`;if(!o.has(i))return i}}a(L,"deriveKey");function T(r,o,n){let i=o.lastIndexOf("/"),s=i>=0?o.slice(i+1):o,a=r.toLowerCase(),l=s.toLowerCase().startsWith(`${a}-`)?s:`${a}-${s}`;if(!n.has(l))return l;for(let d=2;;d++){let c=`${l}-${d}`;if(!n.has(c))return c}}a(T,"deriveProviderModelKey");function R(r){if(r.models.length===0)return {providers:r.providers,models:[],changed:false};let o=r.providers.length>0,n=new Map;for(let t of r.models)n.set(t.key,(n.get(t.key)??0)+1);if(!r.models.some(t=>!t.providerKey||(n.get(t.key)??0)>1))return {providers:r.providers,models:r.models.map(t=>({key:t.key,label:t.label,providerKey:t.providerKey??"",model:t.model,maxOutputTokens:t.maxOutputTokens,maxContextTokens:t.maxContextTokens,provider:t.provider,baseUrl:t.baseUrl,apiKey:t.apiKey})),changed:false};let s=new Map,a=[],l=new Set(r.providers.map(t=>t.key));for(let t of r.providers){let g=`|${t.baseUrl}|${t.apiKey??""}`;s.set(g,t.key);}for(let t of r.models){let g=M(t),h=r.providers.find(O=>O.baseUrl===(t.baseUrl??""));if(h){s.set(g,h.key);continue}if(s.has(g))continue;let m=S(t.baseUrl),f=L(m,l);l.add(f),s.set(g,f),a.push({key:f,kind:m,baseUrl:t.baseUrl??"",apiKey:t.apiKey});}let d=new Set,c=r.models.map(t=>{let g=s.get(M(t)),h=(n.get(t.key)??0)>1,m=t.key;if(h){let f=S(t.baseUrl);m=T(f,t.model,d);}if(d.has(m)){let f=S(t.baseUrl);m=T(f,t.model,d);}return d.add(m),{key:m,label:t.label,providerKey:g,provider:t.provider,model:t.model,baseUrl:t.baseUrl,apiKey:t.apiKey,maxOutputTokens:t.maxOutputTokens,maxContextTokens:t.maxContextTokens}}),p=new Set,v=c.filter(t=>{let g=`${t.key}|${t.model}`;return p.has(g)?false:(p.add(g),true)});return {providers:o?[...r.providers,...a]:a,models:v,changed:true}}a(R,"migrateModels");function k(){return process.env.HOME??homedir()}a(k,"userHome");var P=class{constructor(o=process.cwd()){this.cwd=o;}static{a(this,"SettingsManager");}sources=[];merged=null;load(o){this.sources=[],this.loadJsonFile(join(k(),".code-shell","settings.managed.json"),"managed",0),this.loadJsonFile(join(k(),".code-shell","settings.json"),"user",1),this.loadJsonFile(join(this.cwd,".code-shell","settings.json"),"project",2),this.loadJsonFile(join(this.cwd,".code-shell","settings.local.json"),"local",3),o&&Object.keys(o).length>0&&this.sources.push({name:"flag",priority:4,data:o}),this.sources.sort((s,a)=>s.priority-a.priority);let n=this.deepMerge(),i=join(k(),".code-shell","settings.json");if(existsSync(i))try{let s=JSON.parse(readFileSync(i,"utf-8")),a=R({providers:s.providers??[],models:s.models??[]});if(a.changed){copyFileSync(i,`${i}.bak`);let l={...s,providers:a.providers,models:a.models};writeFileSync(i,JSON.stringify(l,null,2),"utf-8");let d=this.sources.find(p=>p.name==="user");d&&(d.data=l);let c=this.deepMerge();return this.merged=x(c),this.merged}}catch{}return this.merged=x(n),this.merged}get(){return this.merged?this.merged:this.load()}invalidate(){this.merged=null;}saveUserSetting(o,n){let i=join(k(),".code-shell","settings.json"),s={};if(existsSync(i))try{let c=readFileSync(i,"utf-8"),p=JSON.parse(c);p&&typeof p=="object"&&!Array.isArray(p)&&(s=p);}catch{}let a=o.split("."),l=s;for(let c=0;c<a.length-1;c++){let p=a[c],v=l[p];(!v||typeof v!="object"||Array.isArray(v))&&(l[p]={}),l=l[p];}l[a[a.length-1]]=n,mkdirSync(dirname(i),{recursive:true});let d=`${i}.${process.pid}.${Date.now()}.tmp`;writeFileSync(d,JSON.stringify(s,null,2),"utf-8"),renameSync(d,i),this.invalidate();}loadJsonFile(o,n,i){if(existsSync(o))try{let s=readFileSync(o,"utf-8"),a=JSON.parse(s);typeof a=="object"&&a!==null&&this.sources.push({name:n,priority:i,data:a});}catch{}}deepMerge(){let o={};for(let n of this.sources)o=A(o,n.data);return o}};function A(r,o){let n={...r};for(let[i,s]of Object.entries(o))s===null?delete n[i]:typeof s=="object"&&!Array.isArray(s)&&typeof n[i]=="object"&&!Array.isArray(n[i])&&n[i]!==null?n[i]=A(n[i],s):n[i]=s;return n}a(A,"merge");
|
|
2
|
+
export{C as a,x as b,P as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {I,aa,$,T,ga}from'./chunk-Z5HKHAO7.js';import {h,a}from'./chunk-3QP5BQ3L.js';import {join}from'path';import {homedir}from'os';h();h();function R(y,s){let{preset:e,adapter:t,contract:o}=y,w=e.name,x=["Read","Write","Edit","Glob","Grep","Bash","AskUserQuestion","Agent","ToolSearch","TaskCreate","TaskList","TaskUpdate","TaskGet"],i=new Set([...x,...t?.enableTools??[]]);for(let n of t?.disableTools??[])i.delete(n);let S=[{tool:"Read",decision:"allow"},{tool:"Glob",decision:"allow"},{tool:"Grep",decision:"allow"},{tool:"AskUserQuestion",decision:"allow"},{tool:"ToolSearch",decision:"allow"},{tool:"TaskCreate",decision:"allow"},{tool:"TaskList",decision:"allow"},{tool:"TaskUpdate",decision:"allow"},{tool:"TaskGet",decision:"allow"},...t?.permissionRules??[]],l={name:w,label:e.label,description:e.description,promptSections:e.sections??["base","orchestration"],injectGitStatus:e.injectGitStatus??false,builtinTools:[...i],defaultPermissionRules:S};I(l);let r;o?.evaluator?Array.isArray(o.evaluator)?r=new aa(o.evaluator):r=o.evaluator:r=new $;let c=t?.tools??[],d=c.map(n=>({definition:n.definition,execute:n.execute})),u=s.runsDir??join(homedir(),".code-shell","runs"),k=new T(u);return {manager:new ga({store:k,executor:{llm:s.llm,maxTurns:o?.maxTurns??30,maxContextTokens:o?.maxContextTokens??2e5,permissionMode:s.permissionMode??"acceptEdits",sessionStorageDir:s.sessionStorageDir,mcpServers:t?.mcpServers,enabledBuiltinTools:[...i],disabledBuiltinTools:t?.disableTools,customSystemPrompt:e.customPrompt,appendSystemPrompt:e.appendPrompt,hooks:t?.hooks,customTools:d.length>0?d:void 0},concurrency:o?.concurrency??1,runsDir:u,evaluator:r,defaultTags:o?.defaultTags,defaultMetadata:o?.defaultMetadata}),preset:l,customTools:c}}a(R,"defineProduct");export{R as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {h as h$1,a as a$1}from'./chunk-3QP5BQ3L.js';h$1();var a={fetchedAt:"2026-05-20T10:38:49.001Z",source:"https://openrouter.ai/api/v1/models",count:357,models:[{id:"google/gemini-3.5-flash",name:"Google: Gemini 3.5 Flash",created:1779193800,contextLength:1048576,maxOutputTokens:65536,inputPricePerMillion:1.5,outputPricePerMillion:9,modalities:["text","image","video","file","audio"]},{id:"anthropic/claude-opus-4.7-fast",name:"Anthropic: Claude Opus 4.7 (Fast)",created:1778613011,contextLength:1e6,maxOutputTokens:128e3,inputPricePerMillion:30,outputPricePerMillion:150,modalities:["text","image","file"]},{id:"perceptron/perceptron-mk1",name:"Perceptron: Perceptron Mk1",created:1778597029,contextLength:32768,maxOutputTokens:8192,inputPricePerMillion:.15,outputPricePerMillion:1.5,modalities:["text","image","video"]},{id:"inclusionai/ring-2.6-1t",name:"inclusionAI: Ring-2.6-1T",created:1778247440,contextLength:262144,maxOutputTokens:65536,inputPricePerMillion:.075,outputPricePerMillion:.625,modalities:["text"]},{id:"google/gemini-3.1-flash-lite",name:"Google: Gemini 3.1 Flash Lite",created:1778168828,contextLength:1048576,maxOutputTokens:65536,inputPricePerMillion:.25,outputPricePerMillion:1.5,modalities:["text","image","video","file","audio"]},{id:"baidu/cobuddy:free",name:"Baidu Qianfan: CoBuddy (free)",created:1778035480,contextLength:131072,maxOutputTokens:65536,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"openai/gpt-chat-latest",name:"OpenAI: GPT Chat Latest",created:1778000212,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:5,outputPricePerMillion:30,modalities:["text","image","file"]},{id:"x-ai/grok-4.3",name:"xAI: Grok 4.3",created:1777591821,contextLength:1e6,maxOutputTokens:0,inputPricePerMillion:1.25,outputPricePerMillion:2.5,modalities:["text","image"]},{id:"ibm-granite/granite-4.1-8b",name:"IBM: Granite 4.1 8B",created:1777577071,contextLength:131072,maxOutputTokens:131072,inputPricePerMillion:.049999999999999996,outputPricePerMillion:.09999999999999999,modalities:["text"]},{id:"mistralai/mistral-medium-3-5",name:"Mistral: Mistral Medium 3.5",created:1777570439,contextLength:262144,maxOutputTokens:0,inputPricePerMillion:1.5,outputPricePerMillion:7.5,modalities:["text","image","file"]},{id:"openrouter/owl-alpha",name:"Owl Alpha",created:1777398589,contextLength:1048756,maxOutputTokens:262144,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free",name:"NVIDIA: Nemotron 3 Nano Omni (free)",created:1777393095,contextLength:256e3,maxOutputTokens:65536,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text","audio","image","video"]},{id:"poolside/laguna-xs.2:free",name:"Poolside: Laguna XS.2 (free)",created:1777389604,contextLength:131072,maxOutputTokens:8192,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"poolside/laguna-m.1:free",name:"Poolside: Laguna M.1 (free)",created:1777388504,contextLength:131072,maxOutputTokens:8192,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"~anthropic/claude-haiku-latest",name:"Anthropic Claude Haiku Latest",created:1777318492,contextLength:2e5,maxOutputTokens:64e3,inputPricePerMillion:1,outputPricePerMillion:5,modalities:["text","image","file"]},{id:"~openai/gpt-mini-latest",name:"OpenAI GPT Mini Latest",created:1777318471,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:.75,outputPricePerMillion:4.5,modalities:["file","image","text"]},{id:"~google/gemini-pro-latest",name:"Google Gemini Pro Latest",created:1777318451,contextLength:1048576,maxOutputTokens:65536,inputPricePerMillion:2,outputPricePerMillion:12,modalities:["audio","file","image","text","video"]},{id:"~moonshotai/kimi-latest",name:"MoonshotAI Kimi Latest",created:1777318428,contextLength:262142,maxOutputTokens:262142,inputPricePerMillion:.73,outputPricePerMillion:3.49,modalities:["text","image"]},{id:"~google/gemini-flash-latest",name:"Google Gemini Flash Latest",created:1777318398,contextLength:1048576,maxOutputTokens:65536,inputPricePerMillion:1.5,outputPricePerMillion:9,modalities:["text","image","video","file","audio"]},{id:"~anthropic/claude-sonnet-latest",name:"Anthropic Claude Sonnet Latest",created:1777318368,contextLength:1e6,maxOutputTokens:128e3,inputPricePerMillion:3,outputPricePerMillion:15,modalities:["text","image","file"]},{id:"~openai/gpt-latest",name:"OpenAI GPT Latest",created:1777318334,contextLength:105e4,maxOutputTokens:128e3,inputPricePerMillion:5,outputPricePerMillion:30,modalities:["file","image","text"]},{id:"qwen/qwen3.5-plus-20260420",name:"Qwen: Qwen3.5 Plus 2026-04-20",created:1777261368,contextLength:1e6,maxOutputTokens:65536,inputPricePerMillion:.3,outputPricePerMillion:1.7999999999999998,modalities:["text","image","video"]},{id:"qwen/qwen3.6-flash",name:"Qwen: Qwen3.6 Flash",created:1777261362,contextLength:1e6,maxOutputTokens:65536,inputPricePerMillion:.1875,outputPricePerMillion:1.125,modalities:["text","image","video"]},{id:"qwen/qwen3.6-35b-a3b",name:"Qwen: Qwen3.6 35B A3B",created:1777260255,contextLength:262144,maxOutputTokens:0,inputPricePerMillion:.149,outputPricePerMillion:1,modalities:["text","image","video"]},{id:"qwen/qwen3.6-max-preview",name:"Qwen: Qwen3.6 Max Preview",created:1777260242,contextLength:262144,maxOutputTokens:65536,inputPricePerMillion:1.04,outputPricePerMillion:6.24,modalities:["text"]},{id:"qwen/qwen3.6-27b",name:"Qwen: Qwen3.6 27B",created:1777255064,contextLength:262144,maxOutputTokens:81920,inputPricePerMillion:.32,outputPricePerMillion:3.1999999999999997,modalities:["text","image","video"]},{id:"openai/gpt-5.5-pro",name:"OpenAI: GPT-5.5 Pro",created:1777051896,contextLength:105e4,maxOutputTokens:128e3,inputPricePerMillion:30,outputPricePerMillion:180,modalities:["file","image","text"]},{id:"openai/gpt-5.5",name:"OpenAI: GPT-5.5",created:1777051893,contextLength:105e4,maxOutputTokens:128e3,inputPricePerMillion:5,outputPricePerMillion:30,modalities:["file","image","text"]},{id:"deepseek/deepseek-v4-pro",name:"DeepSeek: DeepSeek V4 Pro",created:1777000679,contextLength:1048576,maxOutputTokens:384e3,inputPricePerMillion:.435,outputPricePerMillion:.87,modalities:["text"]},{id:"deepseek/deepseek-v4-flash:free",name:"DeepSeek: DeepSeek V4 Flash (free)",created:1777000666,contextLength:1048576,maxOutputTokens:384e3,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"deepseek/deepseek-v4-flash",name:"DeepSeek: DeepSeek V4 Flash",created:1777000666,contextLength:1048575,maxOutputTokens:0,inputPricePerMillion:.112,outputPricePerMillion:.224,modalities:["text"]},{id:"inclusionai/ling-2.6-1t",name:"inclusionAI: Ling-2.6-1T",created:1776948238,contextLength:262144,maxOutputTokens:32768,inputPricePerMillion:.3,outputPricePerMillion:2.5,modalities:["text"]},{id:"tencent/hy3-preview",name:"Tencent: Hy3 preview",created:1776878150,contextLength:262144,maxOutputTokens:262144,inputPricePerMillion:.06599999999999999,outputPricePerMillion:.26,modalities:["text"]},{id:"xiaomi/mimo-v2.5-pro",name:"Xiaomi: MiMo-V2.5-Pro",created:1776874273,contextLength:1048576,maxOutputTokens:16384,inputPricePerMillion:1,outputPricePerMillion:3,modalities:["text"]},{id:"xiaomi/mimo-v2.5",name:"Xiaomi: MiMo-V2.5",created:1776874269,contextLength:1048576,maxOutputTokens:131072,inputPricePerMillion:.39999999999999997,outputPricePerMillion:2,modalities:["text","audio","image","video"]},{id:"openai/gpt-5.4-image-2",name:"OpenAI: GPT-5.4 Image 2",created:1776797528,contextLength:272e3,maxOutputTokens:128e3,inputPricePerMillion:8,outputPricePerMillion:15,modalities:["image","text","file"]},{id:"inclusionai/ling-2.6-flash",name:"inclusionAI: Ling-2.6-flash",created:1776795886,contextLength:262144,maxOutputTokens:32768,inputPricePerMillion:.01,outputPricePerMillion:.03,modalities:["text"]},{id:"~anthropic/claude-opus-latest",name:"Anthropic: Claude Opus Latest",created:1776795361,contextLength:1e6,maxOutputTokens:128e3,inputPricePerMillion:5,outputPricePerMillion:25,modalities:["text","image","file"]},{id:"openrouter/pareto-code",name:"Pareto Code Router",created:1776747900,contextLength:2e6,maxOutputTokens:0,inputPricePerMillion:-1e6,outputPricePerMillion:-1e6,modalities:["text"]},{id:"baidu/qianfan-ocr-fast",name:"Baidu: Qianfan-OCR-Fast",created:1776707472,contextLength:65536,maxOutputTokens:28672,inputPricePerMillion:.6799999999999999,outputPricePerMillion:2.81,modalities:["image","text"]},{id:"moonshotai/kimi-k2.6",name:"MoonshotAI: Kimi K2.6",created:1776699402,contextLength:262142,maxOutputTokens:262142,inputPricePerMillion:.73,outputPricePerMillion:3.49,modalities:["text","image"]},{id:"anthropic/claude-opus-4.7",name:"Anthropic: Claude Opus 4.7",created:1776351100,contextLength:1e6,maxOutputTokens:128e3,inputPricePerMillion:5,outputPricePerMillion:25,modalities:["text","image","file"]},{id:"anthropic/claude-opus-4.6-fast",name:"Anthropic: Claude Opus 4.6 (Fast)",created:1775592472,contextLength:1e6,maxOutputTokens:128e3,inputPricePerMillion:30,outputPricePerMillion:150,modalities:["text","image","file"]},{id:"z-ai/glm-5.1",name:"Z.ai: GLM 5.1",created:1775578025,contextLength:202800,maxOutputTokens:202800,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"google/gemma-4-26b-a4b-it:free",name:"Google: Gemma 4 26B A4B (free)",created:1775227989,contextLength:262144,maxOutputTokens:32768,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["image","text","video"]},{id:"google/gemma-4-26b-a4b-it",name:"Google: Gemma 4 26B A4B ",created:1775227989,contextLength:262144,maxOutputTokens:0,inputPricePerMillion:.06,outputPricePerMillion:.33,modalities:["image","text","video"]},{id:"google/gemma-4-31b-it:free",name:"Google: Gemma 4 31B (free)",created:1775148486,contextLength:262144,maxOutputTokens:32768,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["image","text","video"]},{id:"google/gemma-4-31b-it",name:"Google: Gemma 4 31B",created:1775148486,contextLength:262144,maxOutputTokens:16384,inputPricePerMillion:.12,outputPricePerMillion:.37,modalities:["image","text","video"]},{id:"qwen/qwen3.6-plus",name:"Qwen: Qwen3.6 Plus",created:1775133557,contextLength:1e6,maxOutputTokens:65536,inputPricePerMillion:.325,outputPricePerMillion:1.95,modalities:["text","image","video"]},{id:"z-ai/glm-5v-turbo",name:"Z.ai: GLM 5V Turbo",created:1775061458,contextLength:202752,maxOutputTokens:131072,inputPricePerMillion:1.2,outputPricePerMillion:4,modalities:["image","text","video"]},{id:"arcee-ai/trinity-large-thinking:free",name:"Arcee AI: Trinity Large Thinking (free)",created:1775058318,contextLength:262144,maxOutputTokens:8e4,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"arcee-ai/trinity-large-thinking",name:"Arcee AI: Trinity Large Thinking",created:1775058318,contextLength:262144,maxOutputTokens:262144,inputPricePerMillion:.22,outputPricePerMillion:.85,modalities:["text"]},{id:"x-ai/grok-4.20-multi-agent",name:"xAI: Grok 4.20 Multi-Agent",created:1774979158,contextLength:2e6,maxOutputTokens:0,inputPricePerMillion:2,outputPricePerMillion:6,modalities:["text","image","file"]},{id:"x-ai/grok-4.20",name:"xAI: Grok 4.20",created:1774979019,contextLength:2e6,maxOutputTokens:0,inputPricePerMillion:1.25,outputPricePerMillion:2.5,modalities:["text","image","file"]},{id:"google/lyria-3-pro-preview",name:"Google: Lyria 3 Pro Preview",created:1774907286,contextLength:1048576,maxOutputTokens:65536,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text","image"]},{id:"google/lyria-3-clip-preview",name:"Google: Lyria 3 Clip Preview",created:1774907255,contextLength:1048576,maxOutputTokens:65536,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text","image"]},{id:"kwaipilot/kat-coder-pro-v2",name:"Kwaipilot: KAT-Coder-Pro V2",created:1774649310,contextLength:256e3,maxOutputTokens:8e4,inputPricePerMillion:.3,outputPricePerMillion:1.2,modalities:["text"]},{id:"rekaai/reka-edge",name:"Reka Edge",created:1774026965,contextLength:16384,maxOutputTokens:16384,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.09999999999999999,modalities:["image","text","video"]},{id:"xiaomi/mimo-v2-omni",name:"Xiaomi: MiMo-V2-Omni",created:1773863703,contextLength:262144,maxOutputTokens:65536,inputPricePerMillion:.39999999999999997,outputPricePerMillion:2,modalities:["text","audio","image","video"]},{id:"xiaomi/mimo-v2-pro",name:"Xiaomi: MiMo-V2-Pro",created:1773863643,contextLength:1048576,maxOutputTokens:131072,inputPricePerMillion:1,outputPricePerMillion:3,modalities:["text"]},{id:"minimax/minimax-m2.7",name:"MiniMax: MiniMax M2.7",created:1773836697,contextLength:196608,maxOutputTokens:131072,inputPricePerMillion:.27899999999999997,outputPricePerMillion:1.2,modalities:["text"]},{id:"openai/gpt-5.4-nano",name:"OpenAI: GPT-5.4 Nano",created:1773748187,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:.19999999999999998,outputPricePerMillion:1.25,modalities:["file","image","text"]},{id:"openai/gpt-5.4-mini",name:"OpenAI: GPT-5.4 Mini",created:1773748178,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:.75,outputPricePerMillion:4.5,modalities:["file","image","text"]},{id:"mistralai/mistral-small-2603",name:"Mistral: Mistral Small 4",created:1773695685,contextLength:262144,maxOutputTokens:0,inputPricePerMillion:.15,outputPricePerMillion:.6,modalities:["text","image"]},{id:"z-ai/glm-5-turbo",name:"Z.ai: GLM 5 Turbo",created:1773583573,contextLength:202752,maxOutputTokens:131072,inputPricePerMillion:1.2,outputPricePerMillion:4,modalities:["text"]},{id:"nvidia/nemotron-3-super-120b-a12b:free",name:"NVIDIA: Nemotron 3 Super (free)",created:1773245239,contextLength:262144,maxOutputTokens:262144,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"nvidia/nemotron-3-super-120b-a12b",name:"NVIDIA: Nemotron 3 Super",created:1773245239,contextLength:262144,maxOutputTokens:0,inputPricePerMillion:.09,outputPricePerMillion:.44999999999999996,modalities:["text"]},{id:"bytedance-seed/seed-2.0-lite",name:"ByteDance Seed: Seed-2.0-Lite",created:1773157231,contextLength:262144,maxOutputTokens:131072,inputPricePerMillion:.25,outputPricePerMillion:2,modalities:["text","image","video"]},{id:"qwen/qwen3.5-9b",name:"Qwen: Qwen3.5-9B",created:1773152396,contextLength:262144,maxOutputTokens:81920,inputPricePerMillion:.04,outputPricePerMillion:.15,modalities:["text","image","video"]},{id:"openai/gpt-5.4-pro",name:"OpenAI: GPT-5.4 Pro",created:1772734366,contextLength:105e4,maxOutputTokens:128e3,inputPricePerMillion:30,outputPricePerMillion:180,modalities:["text","image","file"]},{id:"openai/gpt-5.4",name:"OpenAI: GPT-5.4",created:1772734352,contextLength:105e4,maxOutputTokens:128e3,inputPricePerMillion:2.5,outputPricePerMillion:15,modalities:["text","image","file"]},{id:"inception/mercury-2",name:"Inception: Mercury 2",created:1772636275,contextLength:128e3,maxOutputTokens:5e4,inputPricePerMillion:.25,outputPricePerMillion:.75,modalities:["text"]},{id:"openai/gpt-5.3-chat",name:"OpenAI: GPT-5.3 Chat",created:1772564061,contextLength:128e3,maxOutputTokens:16384,inputPricePerMillion:1.75,outputPricePerMillion:14,modalities:["text","image","file"]},{id:"google/gemini-3.1-flash-lite-preview",name:"Google: Gemini 3.1 Flash Lite Preview",created:1772512673,contextLength:1048576,maxOutputTokens:65536,inputPricePerMillion:.25,outputPricePerMillion:1.5,modalities:["text","image","video","file","audio"]},{id:"bytedance-seed/seed-2.0-mini",name:"ByteDance Seed: Seed-2.0-Mini",created:1772131107,contextLength:262144,maxOutputTokens:131072,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.39999999999999997,modalities:["text","image","video"]},{id:"google/gemini-3.1-flash-image-preview",name:"Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview)",created:1772119558,contextLength:65536,maxOutputTokens:65536,inputPricePerMillion:.5,outputPricePerMillion:3,modalities:["image","text"]},{id:"qwen/qwen3.5-35b-a3b",name:"Qwen: Qwen3.5-35B-A3B",created:1772053822,contextLength:262144,maxOutputTokens:0,inputPricePerMillion:.13899999999999998,outputPricePerMillion:1,modalities:["text","image","video"]},{id:"qwen/qwen3.5-27b",name:"Qwen: Qwen3.5-27B",created:1772053810,contextLength:262144,maxOutputTokens:65536,inputPricePerMillion:.195,outputPricePerMillion:1.56,modalities:["text","image","video"]},{id:"qwen/qwen3.5-122b-a10b",name:"Qwen: Qwen3.5-122B-A10B",created:1772053789,contextLength:262144,maxOutputTokens:65536,inputPricePerMillion:.26,outputPricePerMillion:2.08,modalities:["text","image","video"]},{id:"qwen/qwen3.5-flash-02-23",name:"Qwen: Qwen3.5-Flash",created:1772053776,contextLength:1e6,maxOutputTokens:65536,inputPricePerMillion:.065,outputPricePerMillion:.26,modalities:["text","image","video"]},{id:"liquid/lfm-2-24b-a2b",name:"LiquidAI: LFM2-24B-A2B",created:1772048711,contextLength:32768,maxOutputTokens:0,inputPricePerMillion:.03,outputPricePerMillion:.12,modalities:["text"]},{id:"google/gemini-3.1-pro-preview-customtools",name:"Google: Gemini 3.1 Pro Preview Custom Tools",created:1772045923,contextLength:1048576,maxOutputTokens:65536,inputPricePerMillion:2,outputPricePerMillion:12,modalities:["text","audio","image","video","file"]},{id:"openai/gpt-5.3-codex",name:"OpenAI: GPT-5.3-Codex",created:1771959164,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:1.75,outputPricePerMillion:14,modalities:["text","image","file"]},{id:"aion-labs/aion-2.0",name:"AionLabs: Aion-2.0",created:1771881306,contextLength:131072,maxOutputTokens:32768,inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.5999999999999999,modalities:["text"]},{id:"google/gemini-3.1-pro-preview",name:"Google: Gemini 3.1 Pro Preview",created:1771509627,contextLength:1048576,maxOutputTokens:65536,inputPricePerMillion:2,outputPricePerMillion:12,modalities:["audio","file","image","text","video"]},{id:"anthropic/claude-sonnet-4.6",name:"Anthropic: Claude Sonnet 4.6",created:1771342990,contextLength:1e6,maxOutputTokens:128e3,inputPricePerMillion:3,outputPricePerMillion:15,modalities:["text","image","file"]},{id:"qwen/qwen3.5-plus-02-15",name:"Qwen: Qwen3.5 Plus 2026-02-15",created:1771229416,contextLength:1e6,maxOutputTokens:65536,inputPricePerMillion:.26,outputPricePerMillion:1.56,modalities:["text","image","video"]},{id:"qwen/qwen3.5-397b-a17b",name:"Qwen: Qwen3.5 397B A17B",created:1771223018,contextLength:262144,maxOutputTokens:65536,inputPricePerMillion:.39,outputPricePerMillion:2.34,modalities:["text","image","video"]},{id:"minimax/minimax-m2.5:free",name:"MiniMax: MiniMax M2.5 (free)",created:1770908502,contextLength:196608,maxOutputTokens:8192,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"minimax/minimax-m2.5",name:"MiniMax: MiniMax M2.5",created:1770908502,contextLength:196608,maxOutputTokens:196608,inputPricePerMillion:.15,outputPricePerMillion:1.15,modalities:["text"]},{id:"z-ai/glm-5",name:"Z.ai: GLM 5",created:1770829182,contextLength:202752,maxOutputTokens:0,inputPricePerMillion:.6,outputPricePerMillion:1.92,modalities:["text"]},{id:"qwen/qwen3-max-thinking",name:"Qwen: Qwen3 Max Thinking",created:1770671901,contextLength:262144,maxOutputTokens:32768,inputPricePerMillion:.78,outputPricePerMillion:3.9,modalities:["text"]},{id:"anthropic/claude-opus-4.6",name:"Anthropic: Claude Opus 4.6",created:1770219050,contextLength:1e6,maxOutputTokens:128e3,inputPricePerMillion:5,outputPricePerMillion:25,modalities:["text","image","file"]},{id:"qwen/qwen3-coder-next",name:"Qwen: Qwen3 Coder Next",created:1770164101,contextLength:262144,maxOutputTokens:262144,inputPricePerMillion:.11,outputPricePerMillion:.7999999999999999,modalities:["text"]},{id:"openrouter/free",name:"Free Models Router",created:1769917427,contextLength:2e5,maxOutputTokens:0,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text","image"]},{id:"stepfun/step-3.5-flash",name:"StepFun: Step 3.5 Flash",created:1769728337,contextLength:262144,maxOutputTokens:65536,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.3,modalities:["text"]},{id:"arcee-ai/trinity-large-preview",name:"Arcee AI: Trinity Large Preview",created:1769552670,contextLength:131e3,maxOutputTokens:0,inputPricePerMillion:.15,outputPricePerMillion:.44999999999999996,modalities:["text"]},{id:"moonshotai/kimi-k2.5",name:"MoonshotAI: Kimi K2.5",created:1769487076,contextLength:262144,maxOutputTokens:262144,inputPricePerMillion:.39999999999999997,outputPricePerMillion:1.9,modalities:["text","image"]},{id:"upstage/solar-pro-3",name:"Upstage: Solar Pro 3",created:1769481200,contextLength:128e3,maxOutputTokens:0,inputPricePerMillion:.15,outputPricePerMillion:.6,modalities:["text"]},{id:"minimax/minimax-m2-her",name:"MiniMax: MiniMax M2-her",created:1769177239,contextLength:65536,maxOutputTokens:2048,inputPricePerMillion:.3,outputPricePerMillion:1.2,modalities:["text"]},{id:"writer/palmyra-x5",name:"Writer: Palmyra X5",created:1769003823,contextLength:104e4,maxOutputTokens:8192,inputPricePerMillion:.6,outputPricePerMillion:6,modalities:["text"]},{id:"liquid/lfm-2.5-1.2b-thinking:free",name:"LiquidAI: LFM2.5-1.2B-Thinking (free)",created:1768927527,contextLength:32768,maxOutputTokens:0,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"liquid/lfm-2.5-1.2b-instruct:free",name:"LiquidAI: LFM2.5-1.2B-Instruct (free)",created:1768927521,contextLength:32768,maxOutputTokens:0,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"openai/gpt-audio",name:"OpenAI: GPT Audio",created:1768862569,contextLength:128e3,maxOutputTokens:16384,inputPricePerMillion:2.5,outputPricePerMillion:10,modalities:["text","audio"]},{id:"openai/gpt-audio-mini",name:"OpenAI: GPT Audio Mini",created:1768859419,contextLength:128e3,maxOutputTokens:16384,inputPricePerMillion:.6,outputPricePerMillion:2.4,modalities:["text","audio"]},{id:"z-ai/glm-4.7-flash",name:"Z.ai: GLM 4.7 Flash",created:1768833913,contextLength:202752,maxOutputTokens:16384,inputPricePerMillion:.06,outputPricePerMillion:.39999999999999997,modalities:["text"]},{id:"openai/gpt-5.2-codex",name:"OpenAI: GPT-5.2-Codex",created:1768409315,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:1.75,outputPricePerMillion:14,modalities:["text","image"]},{id:"bytedance-seed/seed-1.6-flash",name:"ByteDance Seed: Seed 1.6 Flash",created:1766505011,contextLength:262144,maxOutputTokens:32768,inputPricePerMillion:.075,outputPricePerMillion:.3,modalities:["image","text","video"]},{id:"bytedance-seed/seed-1.6",name:"ByteDance Seed: Seed 1.6",created:1766504997,contextLength:262144,maxOutputTokens:32768,inputPricePerMillion:.25,outputPricePerMillion:2,modalities:["image","text","video"]},{id:"minimax/minimax-m2.1",name:"MiniMax: MiniMax M2.1",created:1766454997,contextLength:196608,maxOutputTokens:196608,inputPricePerMillion:.29,outputPricePerMillion:.95,modalities:["text"]},{id:"z-ai/glm-4.7",name:"Z.ai: GLM 4.7",created:1766378014,contextLength:202752,maxOutputTokens:131072,inputPricePerMillion:.39999999999999997,outputPricePerMillion:1.75,modalities:["text"]},{id:"google/gemini-3-flash-preview",name:"Google: Gemini 3 Flash Preview",created:1765987078,contextLength:1048576,maxOutputTokens:65536,inputPricePerMillion:.5,outputPricePerMillion:3,modalities:["text","image","file","audio","video"]},{id:"xiaomi/mimo-v2-flash",name:"Xiaomi: MiMo-V2-Flash",created:1765731308,contextLength:262144,maxOutputTokens:65536,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.3,modalities:["text"]},{id:"nvidia/nemotron-3-nano-30b-a3b:free",name:"NVIDIA: Nemotron 3 Nano 30B A3B (free)",created:1765731275,contextLength:256e3,maxOutputTokens:0,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"nvidia/nemotron-3-nano-30b-a3b",name:"NVIDIA: Nemotron 3 Nano 30B A3B",created:1765731275,contextLength:262144,maxOutputTokens:228e3,inputPricePerMillion:.049999999999999996,outputPricePerMillion:.19999999999999998,modalities:["text"]},{id:"openai/gpt-5.2-chat",name:"OpenAI: GPT-5.2 Chat",created:1765389783,contextLength:128e3,maxOutputTokens:32e3,inputPricePerMillion:1.75,outputPricePerMillion:14,modalities:["file","image","text"]},{id:"openai/gpt-5.2-pro",name:"OpenAI: GPT-5.2 Pro",created:1765389780,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:21,outputPricePerMillion:168,modalities:["image","text","file"]},{id:"openai/gpt-5.2",name:"OpenAI: GPT-5.2",created:1765389775,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:1.75,outputPricePerMillion:14,modalities:["file","image","text"]},{id:"mistralai/devstral-2512",name:"Mistral: Devstral 2 2512",created:1765285419,contextLength:262144,maxOutputTokens:0,inputPricePerMillion:.39999999999999997,outputPricePerMillion:2,modalities:["text","file"]},{id:"relace/relace-search",name:"Relace: Relace Search",created:1765213560,contextLength:256e3,maxOutputTokens:128e3,inputPricePerMillion:1,outputPricePerMillion:3,modalities:["text"]},{id:"z-ai/glm-4.6v",name:"Z.ai: GLM 4.6V",created:1765207462,contextLength:131072,maxOutputTokens:24e3,inputPricePerMillion:.3,outputPricePerMillion:.8999999999999999,modalities:["image","text","video"]},{id:"nex-agi/deepseek-v3.1-nex-n1",name:"Nex AGI: DeepSeek V3.1 Nex N1",created:1765204393,contextLength:131072,maxOutputTokens:163840,inputPricePerMillion:.135,outputPricePerMillion:.5,modalities:["text"]},{id:"essentialai/rnj-1-instruct",name:"EssentialAI: Rnj 1 Instruct",created:1765094847,contextLength:32768,maxOutputTokens:0,inputPricePerMillion:.15,outputPricePerMillion:.15,modalities:["text"]},{id:"openrouter/bodybuilder",name:"Body Builder (beta)",created:1764903653,contextLength:128e3,maxOutputTokens:0,inputPricePerMillion:-1e6,outputPricePerMillion:-1e6,modalities:["text"]},{id:"openai/gpt-5.1-codex-max",name:"OpenAI: GPT-5.1-Codex-Max",created:1764878934,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:1.25,outputPricePerMillion:10,modalities:["text","image"]},{id:"amazon/nova-2-lite-v1",name:"Amazon: Nova 2 Lite",created:1764696672,contextLength:1e6,maxOutputTokens:65535,inputPricePerMillion:.3,outputPricePerMillion:2.5,modalities:["text","image","video","file"]},{id:"mistralai/ministral-14b-2512",name:"Mistral: Ministral 3 14B 2512",created:1764681735,contextLength:262144,maxOutputTokens:0,inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998,modalities:["text","image"]},{id:"mistralai/ministral-8b-2512",name:"Mistral: Ministral 3 8B 2512",created:1764681654,contextLength:262144,maxOutputTokens:0,inputPricePerMillion:.15,outputPricePerMillion:.15,modalities:["text","image"]},{id:"mistralai/ministral-3b-2512",name:"Mistral: Ministral 3 3B 2512",created:1764681560,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.09999999999999999,modalities:["text","image"]},{id:"mistralai/mistral-large-2512",name:"Mistral: Mistral Large 3 2512",created:1764624472,contextLength:262144,maxOutputTokens:0,inputPricePerMillion:.5,outputPricePerMillion:1.5,modalities:["text","image","file"]},{id:"arcee-ai/trinity-mini",name:"Arcee AI: Trinity Mini",created:1764601720,contextLength:131072,maxOutputTokens:131072,inputPricePerMillion:.045,outputPricePerMillion:.15,modalities:["text"]},{id:"deepseek/deepseek-v3.2-speciale",name:"DeepSeek: DeepSeek V3.2 Speciale",created:1764594837,contextLength:163840,maxOutputTokens:163840,inputPricePerMillion:.28700000000000003,outputPricePerMillion:.431,modalities:["text"]},{id:"deepseek/deepseek-v3.2",name:"DeepSeek: DeepSeek V3.2",created:1764594642,contextLength:131072,maxOutputTokens:65536,inputPricePerMillion:.252,outputPricePerMillion:.378,modalities:["text"]},{id:"prime-intellect/intellect-3",name:"Prime Intellect: INTELLECT-3",created:1764212534,contextLength:131072,maxOutputTokens:131072,inputPricePerMillion:.19999999999999998,outputPricePerMillion:1.1,modalities:["text"]},{id:"anthropic/claude-opus-4.5",name:"Anthropic: Claude Opus 4.5",created:1764010580,contextLength:2e5,maxOutputTokens:64e3,inputPricePerMillion:5,outputPricePerMillion:25,modalities:["file","image","text"]},{id:"allenai/olmo-3-32b-think",name:"AllenAI: Olmo 3 32B Think",created:1763758276,contextLength:65536,maxOutputTokens:65536,inputPricePerMillion:.15,outputPricePerMillion:.5,modalities:["text"]},{id:"google/gemini-3-pro-image-preview",name:"Google: Nano Banana Pro (Gemini 3 Pro Image Preview)",created:1763653797,contextLength:65536,maxOutputTokens:32768,inputPricePerMillion:2,outputPricePerMillion:12,modalities:["image","text"]},{id:"deepcogito/cogito-v2.1-671b",name:"Deep Cogito: Cogito v2.1 671B",created:1763071233,contextLength:128e3,maxOutputTokens:0,inputPricePerMillion:1.25,outputPricePerMillion:1.25,modalities:["text"]},{id:"openai/gpt-5.1",name:"OpenAI: GPT-5.1",created:1763060305,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:1.25,outputPricePerMillion:10,modalities:["image","text","file"]},{id:"openai/gpt-5.1-chat",name:"OpenAI: GPT-5.1 Chat",created:1763060302,contextLength:128e3,maxOutputTokens:16384,inputPricePerMillion:1.25,outputPricePerMillion:10,modalities:["file","image","text"]},{id:"openai/gpt-5.1-codex",name:"OpenAI: GPT-5.1-Codex",created:1763060298,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:1.25,outputPricePerMillion:10,modalities:["text","image"]},{id:"openai/gpt-5.1-codex-mini",name:"OpenAI: GPT-5.1-Codex-Mini",created:1763057820,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:.25,outputPricePerMillion:2,modalities:["image","text"]},{id:"moonshotai/kimi-k2-thinking",name:"MoonshotAI: Kimi K2 Thinking",created:1762440622,contextLength:262144,maxOutputTokens:262144,inputPricePerMillion:.6,outputPricePerMillion:2.5,modalities:["text"]},{id:"amazon/nova-premier-v1",name:"Amazon: Nova Premier 1.0",created:1761950332,contextLength:1e6,maxOutputTokens:32e3,inputPricePerMillion:2.5,outputPricePerMillion:12.5,modalities:["text","image"]},{id:"perplexity/sonar-pro-search",name:"Perplexity: Sonar Pro Search",created:1761854366,contextLength:2e5,maxOutputTokens:8e3,inputPricePerMillion:3,outputPricePerMillion:15,modalities:["text","image"]},{id:"mistralai/voxtral-small-24b-2507",name:"Mistral: Voxtral Small 24B 2507",created:1761835144,contextLength:32e3,maxOutputTokens:0,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.3,modalities:["text","audio","file"]},{id:"openai/gpt-oss-safeguard-20b",name:"OpenAI: gpt-oss-safeguard-20b",created:1761752836,contextLength:131072,maxOutputTokens:65536,inputPricePerMillion:.075,outputPricePerMillion:.3,modalities:["text"]},{id:"nvidia/nemotron-nano-12b-v2-vl:free",name:"NVIDIA: Nemotron Nano 12B 2 VL (free)",created:1761675565,contextLength:128e3,maxOutputTokens:128e3,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["image","text","video"]},{id:"minimax/minimax-m2",name:"MiniMax: MiniMax M2",created:1761252093,contextLength:196608,maxOutputTokens:196608,inputPricePerMillion:.255,outputPricePerMillion:1,modalities:["text"]},{id:"qwen/qwen3-vl-32b-instruct",name:"Qwen: Qwen3 VL 32B Instruct",created:1761231332,contextLength:131072,maxOutputTokens:32768,inputPricePerMillion:.10400000000000001,outputPricePerMillion:.41600000000000004,modalities:["text","image"]},{id:"ibm-granite/granite-4.0-h-micro",name:"IBM: Granite 4.0 Micro",created:1760927695,contextLength:131e3,maxOutputTokens:131e3,inputPricePerMillion:.017,outputPricePerMillion:.112,modalities:["text"]},{id:"microsoft/phi-4-mini-instruct",name:"Microsoft: Phi 4 Mini Instruct",created:1760726049,contextLength:128e3,maxOutputTokens:128e3,inputPricePerMillion:.08,outputPricePerMillion:.35,modalities:["text"]},{id:"openai/gpt-5-image-mini",name:"OpenAI: GPT-5 Image Mini",created:1760624583,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:2.5,outputPricePerMillion:2,modalities:["file","image","text"]},{id:"anthropic/claude-haiku-4.5",name:"Anthropic: Claude Haiku 4.5",created:1760547638,contextLength:2e5,maxOutputTokens:64e3,inputPricePerMillion:1,outputPricePerMillion:5,modalities:["text","image","file"]},{id:"qwen/qwen3-vl-8b-thinking",name:"Qwen: Qwen3 VL 8B Thinking",created:1760463746,contextLength:131072,maxOutputTokens:32768,inputPricePerMillion:.117,outputPricePerMillion:1.365,modalities:["image","text"]},{id:"qwen/qwen3-vl-8b-instruct",name:"Qwen: Qwen3 VL 8B Instruct",created:1760463308,contextLength:131072,maxOutputTokens:32768,inputPricePerMillion:.08,outputPricePerMillion:.5,modalities:["image","text"]},{id:"openai/gpt-5-image",name:"OpenAI: GPT-5 Image",created:1760447986,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:10,outputPricePerMillion:10,modalities:["image","text","file"]},{id:"openai/o3-deep-research",name:"OpenAI: o3 Deep Research",created:1760129661,contextLength:2e5,maxOutputTokens:1e5,inputPricePerMillion:10,outputPricePerMillion:40,modalities:["image","text","file"]},{id:"openai/o4-mini-deep-research",name:"OpenAI: o4 Mini Deep Research",created:1760129642,contextLength:2e5,maxOutputTokens:1e5,inputPricePerMillion:2,outputPricePerMillion:8,modalities:["file","image","text"]},{id:"nvidia/llama-3.3-nemotron-super-49b-v1.5",name:"NVIDIA: Llama 3.3 Nemotron Super 49B V1.5",created:1760101395,contextLength:131072,maxOutputTokens:16384,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.39999999999999997,modalities:["text"]},{id:"baidu/ernie-4.5-21b-a3b-thinking",name:"Baidu: ERNIE 4.5 21B A3B Thinking",created:1760048887,contextLength:131072,maxOutputTokens:65536,inputPricePerMillion:.07,outputPricePerMillion:.28,modalities:["text"]},{id:"google/gemini-2.5-flash-image",name:"Google: Nano Banana (Gemini 2.5 Flash Image)",created:1759870431,contextLength:32768,maxOutputTokens:32768,inputPricePerMillion:.3,outputPricePerMillion:2.5,modalities:["image","text"]},{id:"qwen/qwen3-vl-30b-a3b-thinking",name:"Qwen: Qwen3 VL 30B A3B Thinking",created:1759794479,contextLength:131072,maxOutputTokens:32768,inputPricePerMillion:.13,outputPricePerMillion:1.56,modalities:["text","image"]},{id:"qwen/qwen3-vl-30b-a3b-instruct",name:"Qwen: Qwen3 VL 30B A3B Instruct",created:1759794476,contextLength:131072,maxOutputTokens:32768,inputPricePerMillion:.13,outputPricePerMillion:.52,modalities:["text","image"]},{id:"openai/gpt-5-pro",name:"OpenAI: GPT-5 Pro",created:1759776663,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:15,outputPricePerMillion:120,modalities:["image","text","file"]},{id:"z-ai/glm-4.6",name:"Z.ai: GLM 4.6",created:1759235576,contextLength:202752,maxOutputTokens:131072,inputPricePerMillion:.43,outputPricePerMillion:1.74,modalities:["text"]},{id:"anthropic/claude-sonnet-4.5",name:"Anthropic: Claude Sonnet 4.5",created:1759161676,contextLength:1e6,maxOutputTokens:64e3,inputPricePerMillion:3,outputPricePerMillion:15,modalities:["text","image","file"]},{id:"deepseek/deepseek-v3.2-exp",name:"DeepSeek: DeepSeek V3.2 Exp",created:1759150481,contextLength:163840,maxOutputTokens:65536,inputPricePerMillion:.27,outputPricePerMillion:.41,modalities:["text"]},{id:"thedrummer/cydonia-24b-v4.1",name:"TheDrummer: Cydonia 24B V4.1",created:1758931878,contextLength:131072,maxOutputTokens:131072,inputPricePerMillion:.3,outputPricePerMillion:.5,modalities:["text"]},{id:"relace/relace-apply-3",name:"Relace: Relace Apply 3",created:1758891572,contextLength:256e3,maxOutputTokens:128e3,inputPricePerMillion:.85,outputPricePerMillion:1.25,modalities:["text"]},{id:"google/gemini-2.5-flash-lite-preview-09-2025",name:"Google: Gemini 2.5 Flash Lite Preview 09-2025",created:1758819686,contextLength:1048576,maxOutputTokens:65535,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.39999999999999997,modalities:["text","image","file","audio","video"]},{id:"qwen/qwen3-vl-235b-a22b-thinking",name:"Qwen: Qwen3 VL 235B A22B Thinking",created:1758668690,contextLength:131072,maxOutputTokens:32768,inputPricePerMillion:.26,outputPricePerMillion:2.6,modalities:["text","image"]},{id:"qwen/qwen3-vl-235b-a22b-instruct",name:"Qwen: Qwen3 VL 235B A22B Instruct",created:1758668687,contextLength:262144,maxOutputTokens:16384,inputPricePerMillion:.19999999999999998,outputPricePerMillion:.88,modalities:["text","image"]},{id:"qwen/qwen3-max",name:"Qwen: Qwen3 Max",created:1758662808,contextLength:262144,maxOutputTokens:32768,inputPricePerMillion:.78,outputPricePerMillion:3.9,modalities:["text"]},{id:"qwen/qwen3-coder-plus",name:"Qwen: Qwen3 Coder Plus",created:1758662707,contextLength:1e6,maxOutputTokens:65536,inputPricePerMillion:.65,outputPricePerMillion:3.25,modalities:["text"]},{id:"openai/gpt-5-codex",name:"OpenAI: GPT-5 Codex",created:1758643403,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:1.25,outputPricePerMillion:10,modalities:["text","image"]},{id:"deepseek/deepseek-v3.1-terminus",name:"DeepSeek: DeepSeek V3.1 Terminus",created:1758548275,contextLength:163840,maxOutputTokens:32768,inputPricePerMillion:.27,outputPricePerMillion:.95,modalities:["text"]},{id:"alibaba/tongyi-deepresearch-30b-a3b",name:"Tongyi DeepResearch 30B A3B",created:1758210804,contextLength:131072,maxOutputTokens:131072,inputPricePerMillion:.09,outputPricePerMillion:.44999999999999996,modalities:["text"]},{id:"qwen/qwen3-coder-flash",name:"Qwen: Qwen3 Coder Flash",created:1758115536,contextLength:1e6,maxOutputTokens:65536,inputPricePerMillion:.195,outputPricePerMillion:.975,modalities:["text"]},{id:"qwen/qwen3-next-80b-a3b-thinking",name:"Qwen: Qwen3 Next 80B A3B Thinking",created:1757612284,contextLength:131072,maxOutputTokens:32768,inputPricePerMillion:.0975,outputPricePerMillion:.78,modalities:["text"]},{id:"qwen/qwen3-next-80b-a3b-instruct:free",name:"Qwen: Qwen3 Next 80B A3B Instruct (free)",created:1757612213,contextLength:262144,maxOutputTokens:0,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"qwen/qwen3-next-80b-a3b-instruct",name:"Qwen: Qwen3 Next 80B A3B Instruct",created:1757612213,contextLength:262144,maxOutputTokens:16384,inputPricePerMillion:.09,outputPricePerMillion:1.1,modalities:["text"]},{id:"qwen/qwen-plus-2025-07-28:thinking",name:"Qwen: Qwen Plus 0728 (thinking)",created:1757347599,contextLength:1e6,maxOutputTokens:32768,inputPricePerMillion:.26,outputPricePerMillion:.78,modalities:["text"]},{id:"qwen/qwen-plus-2025-07-28",name:"Qwen: Qwen Plus 0728",created:1757347599,contextLength:1e6,maxOutputTokens:32768,inputPricePerMillion:.26,outputPricePerMillion:.78,modalities:["text"]},{id:"nvidia/nemotron-nano-9b-v2:free",name:"NVIDIA: Nemotron Nano 9B V2 (free)",created:1757106807,contextLength:128e3,maxOutputTokens:0,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"nvidia/nemotron-nano-9b-v2",name:"NVIDIA: Nemotron Nano 9B V2",created:1757106807,contextLength:131072,maxOutputTokens:16384,inputPricePerMillion:.04,outputPricePerMillion:.16,modalities:["text"]},{id:"moonshotai/kimi-k2-0905",name:"MoonshotAI: Kimi K2 0905",created:1757021147,contextLength:262144,maxOutputTokens:262144,inputPricePerMillion:.6,outputPricePerMillion:2.5,modalities:["text"]},{id:"qwen/qwen3-30b-a3b-thinking-2507",name:"Qwen: Qwen3 30B A3B Thinking 2507",created:1756399192,contextLength:131072,maxOutputTokens:131072,inputPricePerMillion:.08,outputPricePerMillion:.39999999999999997,modalities:["text"]},{id:"nousresearch/hermes-4-70b",name:"Nous: Hermes 4 70B",created:1756236182,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:.13,outputPricePerMillion:.39999999999999997,modalities:["text"]},{id:"nousresearch/hermes-4-405b",name:"Nous: Hermes 4 405B",created:1756235463,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:1,outputPricePerMillion:3,modalities:["text"]},{id:"deepseek/deepseek-chat-v3.1",name:"DeepSeek: DeepSeek V3.1",created:1755779628,contextLength:163840,maxOutputTokens:32768,inputPricePerMillion:.21,outputPricePerMillion:.7899999999999999,modalities:["text"]},{id:"openai/gpt-4o-audio-preview",name:"OpenAI: GPT-4o Audio",created:1755233061,contextLength:128e3,maxOutputTokens:16384,inputPricePerMillion:2.5,outputPricePerMillion:10,modalities:["audio","text"]},{id:"mistralai/mistral-medium-3.1",name:"Mistral: Mistral Medium 3.1",created:1755095639,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:.39999999999999997,outputPricePerMillion:2,modalities:["text","image","file"]},{id:"baidu/ernie-4.5-21b-a3b",name:"Baidu: ERNIE 4.5 21B A3B",created:1755034167,contextLength:12e4,maxOutputTokens:8e3,inputPricePerMillion:.07,outputPricePerMillion:.28,modalities:["text"]},{id:"baidu/ernie-4.5-vl-28b-a3b",name:"Baidu: ERNIE 4.5 VL 28B A3B",created:1755032836,contextLength:3e4,maxOutputTokens:8e3,inputPricePerMillion:.14,outputPricePerMillion:.56,modalities:["text","image"]},{id:"z-ai/glm-4.5v",name:"Z.ai: GLM 4.5V",created:1754922288,contextLength:65536,maxOutputTokens:16384,inputPricePerMillion:.6,outputPricePerMillion:1.7999999999999998,modalities:["text","image"]},{id:"ai21/jamba-large-1.7",name:"AI21: Jamba Large 1.7",created:1754669020,contextLength:256e3,maxOutputTokens:4096,inputPricePerMillion:2,outputPricePerMillion:8,modalities:["text"]},{id:"openai/gpt-5-chat",name:"OpenAI: GPT-5 Chat",created:1754587837,contextLength:128e3,maxOutputTokens:16384,inputPricePerMillion:1.25,outputPricePerMillion:10,modalities:["file","image","text"]},{id:"openai/gpt-5",name:"OpenAI: GPT-5",created:1754587413,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:1.25,outputPricePerMillion:10,modalities:["text","image","file"]},{id:"openai/gpt-5-mini",name:"OpenAI: GPT-5 Mini",created:1754587407,contextLength:4e5,maxOutputTokens:128e3,inputPricePerMillion:.25,outputPricePerMillion:2,modalities:["text","image","file"]},{id:"openai/gpt-5-nano",name:"OpenAI: GPT-5 Nano",created:1754587402,contextLength:4e5,maxOutputTokens:0,inputPricePerMillion:.049999999999999996,outputPricePerMillion:.39999999999999997,modalities:["text","image","file"]},{id:"openai/gpt-oss-120b:free",name:"OpenAI: gpt-oss-120b (free)",created:1754414231,contextLength:131072,maxOutputTokens:131072,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"openai/gpt-oss-120b",name:"OpenAI: gpt-oss-120b",created:1754414231,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:.039,outputPricePerMillion:.18,modalities:["text"]},{id:"openai/gpt-oss-20b:free",name:"OpenAI: gpt-oss-20b (free)",created:1754414229,contextLength:131072,maxOutputTokens:8192,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"openai/gpt-oss-20b",name:"OpenAI: gpt-oss-20b",created:1754414229,contextLength:131072,maxOutputTokens:131072,inputPricePerMillion:.03,outputPricePerMillion:.14,modalities:["text"]},{id:"anthropic/claude-opus-4.1",name:"Anthropic: Claude Opus 4.1",created:1754411591,contextLength:2e5,maxOutputTokens:32e3,inputPricePerMillion:15,outputPricePerMillion:75,modalities:["image","text","file"]},{id:"mistralai/codestral-2508",name:"Mistral: Codestral 2508",created:1754079630,contextLength:256e3,maxOutputTokens:0,inputPricePerMillion:.3,outputPricePerMillion:.8999999999999999,modalities:["text","file"]},{id:"qwen/qwen3-coder-30b-a3b-instruct",name:"Qwen: Qwen3 Coder 30B A3B Instruct",created:1753972379,contextLength:16e4,maxOutputTokens:32768,inputPricePerMillion:.07,outputPricePerMillion:.27,modalities:["text"]},{id:"qwen/qwen3-30b-a3b-instruct-2507",name:"Qwen: Qwen3 30B A3B Instruct 2507",created:1753806965,contextLength:262144,maxOutputTokens:262144,inputPricePerMillion:.09,outputPricePerMillion:.3,modalities:["text"]},{id:"z-ai/glm-4.5",name:"Z.ai: GLM 4.5",created:1753471347,contextLength:131072,maxOutputTokens:98304,inputPricePerMillion:.6,outputPricePerMillion:2.2,modalities:["text"]},{id:"z-ai/glm-4.5-air:free",name:"Z.ai: GLM 4.5 Air (free)",created:1753471258,contextLength:131072,maxOutputTokens:96e3,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"z-ai/glm-4.5-air",name:"Z.ai: GLM 4.5 Air",created:1753471258,contextLength:131072,maxOutputTokens:98304,inputPricePerMillion:.13,outputPricePerMillion:.85,modalities:["text"]},{id:"qwen/qwen3-235b-a22b-thinking-2507",name:"Qwen: Qwen3 235B A22B Thinking 2507",created:1753449557,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:.14950000000000002,outputPricePerMillion:1.495,modalities:["text"]},{id:"z-ai/glm-4-32b",name:"Z.ai: GLM 4 32B ",created:1753376617,contextLength:128e3,maxOutputTokens:0,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.09999999999999999,modalities:["text"]},{id:"qwen/qwen3-coder:free",name:"Qwen: Qwen3 Coder 480B A35B (free)",created:1753230546,contextLength:262e3,maxOutputTokens:262e3,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"qwen/qwen3-coder",name:"Qwen: Qwen3 Coder 480B A35B",created:1753230546,contextLength:262144,maxOutputTokens:65536,inputPricePerMillion:.22,outputPricePerMillion:1.7999999999999998,modalities:["text"]},{id:"bytedance/ui-tars-1.5-7b",name:"ByteDance: UI-TARS 7B ",created:1753205056,contextLength:128e3,maxOutputTokens:2048,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.19999999999999998,modalities:["image","text"]},{id:"google/gemini-2.5-flash-lite",name:"Google: Gemini 2.5 Flash Lite",created:1753200276,contextLength:1048576,maxOutputTokens:65535,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.39999999999999997,modalities:["text","image","file","audio","video"]},{id:"qwen/qwen3-235b-a22b-2507",name:"Qwen: Qwen3 235B A22B Instruct 2507",created:1753119555,contextLength:262144,maxOutputTokens:16384,inputPricePerMillion:.071,outputPricePerMillion:.09999999999999999,modalities:["text"]},{id:"switchpoint/router",name:"Switchpoint Router",created:1752272899,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:.85,outputPricePerMillion:3.4,modalities:["text"]},{id:"moonshotai/kimi-k2",name:"MoonshotAI: Kimi K2 0711",created:1752263252,contextLength:131072,maxOutputTokens:32768,inputPricePerMillion:.5700000000000001,outputPricePerMillion:2.3,modalities:["text"]},{id:"mistralai/devstral-medium",name:"Mistral: Devstral Medium",created:1752161321,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:.39999999999999997,outputPricePerMillion:2,modalities:["text","file"]},{id:"mistralai/devstral-small",name:"Mistral: Devstral Small 1.1",created:1752160751,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.3,modalities:["text","file"]},{id:"cognitivecomputations/dolphin-mistral-24b-venice-edition:free",name:"Venice: Uncensored (free)",created:1752094966,contextLength:32768,maxOutputTokens:0,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"tencent/hunyuan-a13b-instruct",name:"Tencent: Hunyuan A13B Instruct",created:1751987664,contextLength:131072,maxOutputTokens:131072,inputPricePerMillion:.14,outputPricePerMillion:.5700000000000001,modalities:["text"]},{id:"morph/morph-v3-large",name:"Morph: Morph V3 Large",created:1751910858,contextLength:262144,maxOutputTokens:131072,inputPricePerMillion:.8999999999999999,outputPricePerMillion:1.9,modalities:["text"]},{id:"morph/morph-v3-fast",name:"Morph: Morph V3 Fast",created:1751910002,contextLength:81920,maxOutputTokens:38e3,inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.2,modalities:["text"]},{id:"baidu/ernie-4.5-vl-424b-a47b",name:"Baidu: ERNIE 4.5 VL 424B A47B ",created:1751300903,contextLength:123e3,maxOutputTokens:16e3,inputPricePerMillion:.42,outputPricePerMillion:1.25,modalities:["image","text"]},{id:"baidu/ernie-4.5-300b-a47b",name:"Baidu: ERNIE 4.5 300B A47B ",created:1751300139,contextLength:123e3,maxOutputTokens:12e3,inputPricePerMillion:.28,outputPricePerMillion:1.1,modalities:["text"]},{id:"mistralai/mistral-small-3.2-24b-instruct",name:"Mistral: Mistral Small 3.2 24B",created:1750443016,contextLength:128e3,maxOutputTokens:16384,inputPricePerMillion:.075,outputPricePerMillion:.19999999999999998,modalities:["image","text"]},{id:"minimax/minimax-m1",name:"MiniMax: MiniMax M1",created:1750200414,contextLength:1e6,maxOutputTokens:4e4,inputPricePerMillion:.39999999999999997,outputPricePerMillion:2.2,modalities:["text"]},{id:"google/gemini-2.5-flash",name:"Google: Gemini 2.5 Flash",created:1750172488,contextLength:1048576,maxOutputTokens:65535,inputPricePerMillion:.3,outputPricePerMillion:2.5,modalities:["file","image","text","audio","video"]},{id:"google/gemini-2.5-pro",name:"Google: Gemini 2.5 Pro",created:1750169544,contextLength:1048576,maxOutputTokens:65536,inputPricePerMillion:1.25,outputPricePerMillion:10,modalities:["text","image","file","audio","video"]},{id:"openai/o3-pro",name:"OpenAI: o3 Pro",created:1749598352,contextLength:2e5,maxOutputTokens:1e5,inputPricePerMillion:20,outputPricePerMillion:80,modalities:["text","file","image"]},{id:"google/gemini-2.5-pro-preview",name:"Google: Gemini 2.5 Pro Preview 06-05",created:1749137257,contextLength:1048576,maxOutputTokens:65536,inputPricePerMillion:1.25,outputPricePerMillion:10,modalities:["file","image","text","audio"]},{id:"deepseek/deepseek-r1-0528",name:"DeepSeek: R1 0528",created:1748455170,contextLength:163840,maxOutputTokens:32768,inputPricePerMillion:.5,outputPricePerMillion:2.1500000000000004,modalities:["text"]},{id:"anthropic/claude-opus-4",name:"Anthropic: Claude Opus 4",created:1747931245,contextLength:2e5,maxOutputTokens:32e3,inputPricePerMillion:15,outputPricePerMillion:75,modalities:["image","text","file"]},{id:"anthropic/claude-sonnet-4",name:"Anthropic: Claude Sonnet 4",created:1747930371,contextLength:1e6,maxOutputTokens:64e3,inputPricePerMillion:3,outputPricePerMillion:15,modalities:["image","text","file"]},{id:"google/gemma-3n-e4b-it",name:"Google: Gemma 3n 4B",created:1747776824,contextLength:32768,maxOutputTokens:0,inputPricePerMillion:.06,outputPricePerMillion:.12,modalities:["text"]},{id:"mistralai/mistral-medium-3",name:"Mistral: Mistral Medium 3",created:1746627341,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:.39999999999999997,outputPricePerMillion:2,modalities:["text","image","file"]},{id:"google/gemini-2.5-pro-preview-05-06",name:"Google: Gemini 2.5 Pro Preview 05-06",created:1746578513,contextLength:1048576,maxOutputTokens:65535,inputPricePerMillion:1.25,outputPricePerMillion:10,modalities:["text","image","file","audio","video"]},{id:"arcee-ai/spotlight",name:"Arcee AI: Spotlight",created:1746481552,contextLength:131072,maxOutputTokens:65537,inputPricePerMillion:.18,outputPricePerMillion:.18,modalities:["image","text"]},{id:"arcee-ai/maestro-reasoning",name:"Arcee AI: Maestro Reasoning",created:1746481269,contextLength:131072,maxOutputTokens:32e3,inputPricePerMillion:.8999999999999999,outputPricePerMillion:3.3000000000000003,modalities:["text"]},{id:"arcee-ai/virtuoso-large",name:"Arcee AI: Virtuoso Large",created:1746478885,contextLength:131072,maxOutputTokens:64e3,inputPricePerMillion:.75,outputPricePerMillion:1.2,modalities:["text"]},{id:"arcee-ai/coder-large",name:"Arcee AI: Coder Large",created:1746478663,contextLength:32768,maxOutputTokens:0,inputPricePerMillion:.5,outputPricePerMillion:.7999999999999999,modalities:["text"]},{id:"meta-llama/llama-guard-4-12b",name:"Meta: Llama Guard 4 12B",created:1745975193,contextLength:163840,maxOutputTokens:16384,inputPricePerMillion:.18,outputPricePerMillion:.18,modalities:["image","text"]},{id:"qwen/qwen3-30b-a3b",name:"Qwen: Qwen3 30B A3B",created:1745878604,contextLength:40960,maxOutputTokens:2e4,inputPricePerMillion:.09,outputPricePerMillion:.44999999999999996,modalities:["text"]},{id:"qwen/qwen3-8b",name:"Qwen: Qwen3 8B",created:1745876632,contextLength:40960,maxOutputTokens:8192,inputPricePerMillion:.049999999999999996,outputPricePerMillion:.39999999999999997,modalities:["text"]},{id:"qwen/qwen3-14b",name:"Qwen: Qwen3 14B",created:1745876478,contextLength:40960,maxOutputTokens:40960,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.24,modalities:["text"]},{id:"qwen/qwen3-32b",name:"Qwen: Qwen3 32B",created:1745875945,contextLength:40960,maxOutputTokens:16384,inputPricePerMillion:.08,outputPricePerMillion:.28,modalities:["text"]},{id:"qwen/qwen3-235b-a22b",name:"Qwen: Qwen3 235B A22B",created:1745875757,contextLength:131072,maxOutputTokens:8192,inputPricePerMillion:.45499999999999996,outputPricePerMillion:1.8199999999999998,modalities:["text"]},{id:"openai/o4-mini-high",name:"OpenAI: o4 Mini High",created:1744824212,contextLength:2e5,maxOutputTokens:1e5,inputPricePerMillion:1.1,outputPricePerMillion:4.4,modalities:["image","text","file"]},{id:"openai/o3",name:"OpenAI: o3",created:1744823457,contextLength:2e5,maxOutputTokens:1e5,inputPricePerMillion:2,outputPricePerMillion:8,modalities:["image","text","file"]},{id:"openai/o4-mini",name:"OpenAI: o4 Mini",created:1744820942,contextLength:2e5,maxOutputTokens:1e5,inputPricePerMillion:1.1,outputPricePerMillion:4.4,modalities:["image","text","file"]},{id:"openai/gpt-4.1",name:"OpenAI: GPT-4.1",created:1744651385,contextLength:1047576,maxOutputTokens:0,inputPricePerMillion:2,outputPricePerMillion:8,modalities:["image","text","file"]},{id:"openai/gpt-4.1-mini",name:"OpenAI: GPT-4.1 Mini",created:1744651381,contextLength:1047576,maxOutputTokens:32768,inputPricePerMillion:.39999999999999997,outputPricePerMillion:1.5999999999999999,modalities:["image","text","file"]},{id:"openai/gpt-4.1-nano",name:"OpenAI: GPT-4.1 Nano",created:1744651369,contextLength:1047576,maxOutputTokens:32768,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.39999999999999997,modalities:["image","text","file"]},{id:"alfredpros/codellama-7b-instruct-solidity",name:"AlfredPros: CodeLLaMa 7B Instruct Solidity",created:1744641874,contextLength:4096,maxOutputTokens:4096,inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.2,modalities:["text"]},{id:"meta-llama/llama-4-maverick",name:"Meta: Llama 4 Maverick",created:1743881822,contextLength:1048576,maxOutputTokens:16384,inputPricePerMillion:.15,outputPricePerMillion:.6,modalities:["text","image"]},{id:"meta-llama/llama-4-scout",name:"Meta: Llama 4 Scout",created:1743881519,contextLength:327680,maxOutputTokens:16384,inputPricePerMillion:.08,outputPricePerMillion:.3,modalities:["text","image"]},{id:"deepseek/deepseek-chat-v3-0324",name:"DeepSeek: DeepSeek V3 0324",created:1742824755,contextLength:163840,maxOutputTokens:16384,inputPricePerMillion:.19999999999999998,outputPricePerMillion:.77,modalities:["text"]},{id:"openai/o1-pro",name:"OpenAI: o1-pro",created:1742423211,contextLength:2e5,maxOutputTokens:1e5,inputPricePerMillion:150,outputPricePerMillion:600,modalities:["text","image","file"]},{id:"mistralai/mistral-small-3.1-24b-instruct",name:"Mistral: Mistral Small 3.1 24B",created:1742238937,contextLength:128e3,maxOutputTokens:128e3,inputPricePerMillion:.351,outputPricePerMillion:.5549999999999999,modalities:["text","image"]},{id:"google/gemma-3-4b-it",name:"Google: Gemma 3 4B",created:1741905510,contextLength:131072,maxOutputTokens:16384,inputPricePerMillion:.04,outputPricePerMillion:.08,modalities:["text","image"]},{id:"google/gemma-3-12b-it",name:"Google: Gemma 3 12B",created:1741902625,contextLength:131072,maxOutputTokens:16384,inputPricePerMillion:.04,outputPricePerMillion:.13,modalities:["text","image"]},{id:"cohere/command-a",name:"Cohere: Command A",created:1741894342,contextLength:256e3,maxOutputTokens:8192,inputPricePerMillion:2.5,outputPricePerMillion:10,modalities:["text"]},{id:"openai/gpt-4o-mini-search-preview",name:"OpenAI: GPT-4o-mini Search Preview",created:1741818122,contextLength:128e3,maxOutputTokens:16384,inputPricePerMillion:.15,outputPricePerMillion:.6,modalities:["text"]},{id:"openai/gpt-4o-search-preview",name:"OpenAI: GPT-4o Search Preview",created:1741817949,contextLength:128e3,maxOutputTokens:16384,inputPricePerMillion:2.5,outputPricePerMillion:10,modalities:["text"]},{id:"rekaai/reka-flash-3",name:"Reka Flash 3",created:1741812813,contextLength:65536,maxOutputTokens:65536,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.19999999999999998,modalities:["text"]},{id:"google/gemma-3-27b-it",name:"Google: Gemma 3 27B",created:1741756359,contextLength:131072,maxOutputTokens:16384,inputPricePerMillion:.08,outputPricePerMillion:.16,modalities:["text","image"]},{id:"thedrummer/skyfall-36b-v2",name:"TheDrummer: Skyfall 36B V2",created:1741636566,contextLength:32768,maxOutputTokens:32768,inputPricePerMillion:.55,outputPricePerMillion:.7999999999999999,modalities:["text"]},{id:"perplexity/sonar-reasoning-pro",name:"Perplexity: Sonar Reasoning Pro",created:1741313308,contextLength:128e3,maxOutputTokens:0,inputPricePerMillion:2,outputPricePerMillion:8,modalities:["text","image"]},{id:"perplexity/sonar-pro",name:"Perplexity: Sonar Pro",created:1741312423,contextLength:2e5,maxOutputTokens:8e3,inputPricePerMillion:3,outputPricePerMillion:15,modalities:["text","image"]},{id:"perplexity/sonar-deep-research",name:"Perplexity: Sonar Deep Research",created:1741311246,contextLength:128e3,maxOutputTokens:0,inputPricePerMillion:2,outputPricePerMillion:8,modalities:["text"]},{id:"google/gemini-2.0-flash-lite-001",name:"Google: Gemini 2.0 Flash Lite",created:1740506212,contextLength:1048576,maxOutputTokens:8192,inputPricePerMillion:.075,outputPricePerMillion:.3,modalities:["text","image","file","audio","video"]},{id:"mistralai/mistral-saba",name:"Mistral: Saba",created:1739803239,contextLength:32768,maxOutputTokens:0,inputPricePerMillion:.19999999999999998,outputPricePerMillion:.6,modalities:["text","file"]},{id:"meta-llama/llama-guard-3-8b",name:"Llama Guard 3 8B",created:1739401318,contextLength:131072,maxOutputTokens:131072,inputPricePerMillion:.48400000000000004,outputPricePerMillion:.03,modalities:["text"]},{id:"openai/o3-mini-high",name:"OpenAI: o3 Mini High",created:1739372611,contextLength:2e5,maxOutputTokens:1e5,inputPricePerMillion:1.1,outputPricePerMillion:4.4,modalities:["text","file"]},{id:"google/gemini-2.0-flash-001",name:"Google: Gemini 2.0 Flash",created:1738769413,contextLength:1e6,maxOutputTokens:8192,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.39999999999999997,modalities:["text","image","file","audio","video"]},{id:"aion-labs/aion-1.0",name:"AionLabs: Aion-1.0",created:1738697557,contextLength:131072,maxOutputTokens:32768,inputPricePerMillion:4,outputPricePerMillion:8,modalities:["text"]},{id:"aion-labs/aion-1.0-mini",name:"AionLabs: Aion-1.0-Mini",created:1738697107,contextLength:131072,maxOutputTokens:32768,inputPricePerMillion:.7,outputPricePerMillion:1.4,modalities:["text"]},{id:"aion-labs/aion-rp-llama-3.1-8b",name:"AionLabs: Aion-RP 1.0 (8B)",created:1738696718,contextLength:32768,maxOutputTokens:32768,inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.5999999999999999,modalities:["text"]},{id:"qwen/qwen2.5-vl-72b-instruct",name:"Qwen: Qwen2.5 VL 72B Instruct",created:1738410311,contextLength:32e3,maxOutputTokens:0,inputPricePerMillion:.25,outputPricePerMillion:.75,modalities:["text","image"]},{id:"qwen/qwen-plus",name:"Qwen: Qwen-Plus",created:1738409840,contextLength:1e6,maxOutputTokens:32768,inputPricePerMillion:.26,outputPricePerMillion:.78,modalities:["text"]},{id:"openai/o3-mini",name:"OpenAI: o3 Mini",created:1738351721,contextLength:2e5,maxOutputTokens:1e5,inputPricePerMillion:1.1,outputPricePerMillion:4.4,modalities:["text","file"]},{id:"mistralai/mistral-small-24b-instruct-2501",name:"Mistral: Mistral Small 3",created:1738255409,contextLength:32768,maxOutputTokens:16384,inputPricePerMillion:.049999999999999996,outputPricePerMillion:.08,modalities:["text"]},{id:"deepseek/deepseek-r1-distill-qwen-32b",name:"DeepSeek: R1 Distill Qwen 32B",created:1738194830,contextLength:32768,maxOutputTokens:32768,inputPricePerMillion:.29,outputPricePerMillion:.29,modalities:["text"]},{id:"perplexity/sonar",name:"Perplexity: Sonar",created:1738013808,contextLength:127072,maxOutputTokens:0,inputPricePerMillion:1,outputPricePerMillion:1,modalities:["text","image"]},{id:"deepseek/deepseek-r1-distill-llama-70b",name:"DeepSeek: R1 Distill Llama 70B",created:1737663169,contextLength:131072,maxOutputTokens:16384,inputPricePerMillion:.7,outputPricePerMillion:.7999999999999999,modalities:["text"]},{id:"deepseek/deepseek-r1",name:"DeepSeek: R1",created:1737381095,contextLength:64e3,maxOutputTokens:16e3,inputPricePerMillion:.7,outputPricePerMillion:2.5,modalities:["text"]},{id:"minimax/minimax-01",name:"MiniMax: MiniMax-01",created:1736915462,contextLength:1000192,maxOutputTokens:1000192,inputPricePerMillion:.19999999999999998,outputPricePerMillion:1.1,modalities:["text","image"]},{id:"microsoft/phi-4",name:"Microsoft: Phi 4",created:1736489872,contextLength:16384,maxOutputTokens:16384,inputPricePerMillion:.065,outputPricePerMillion:.14,modalities:["text"]},{id:"sao10k/l3.1-70b-hanami-x1",name:"Sao10K: Llama 3.1 70B Hanami x1",created:1736302854,contextLength:16e3,maxOutputTokens:0,inputPricePerMillion:3,outputPricePerMillion:3,modalities:["text"]},{id:"deepseek/deepseek-chat",name:"DeepSeek: DeepSeek V3",created:1735241320,contextLength:163840,maxOutputTokens:16384,inputPricePerMillion:.32,outputPricePerMillion:.8899999999999999,modalities:["text"]},{id:"sao10k/l3.3-euryale-70b",name:"Sao10K: Llama 3.3 Euryale 70B",created:1734535928,contextLength:131072,maxOutputTokens:16384,inputPricePerMillion:.65,outputPricePerMillion:.75,modalities:["text"]},{id:"openai/o1",name:"OpenAI: o1",created:1734459999,contextLength:2e5,maxOutputTokens:1e5,inputPricePerMillion:15,outputPricePerMillion:60,modalities:["text","image","file"]},{id:"cohere/command-r7b-12-2024",name:"Cohere: Command R7B (12-2024)",created:1734158152,contextLength:128e3,maxOutputTokens:4e3,inputPricePerMillion:.0375,outputPricePerMillion:.15,modalities:["text"]},{id:"meta-llama/llama-3.3-70b-instruct:free",name:"Meta: Llama 3.3 70B Instruct (free)",created:1733506137,contextLength:65536,maxOutputTokens:0,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"meta-llama/llama-3.3-70b-instruct",name:"Meta: Llama 3.3 70B Instruct",created:1733506137,contextLength:131072,maxOutputTokens:16384,inputPricePerMillion:.09999999999999999,outputPricePerMillion:.32,modalities:["text"]},{id:"amazon/nova-lite-v1",name:"Amazon: Nova Lite 1.0",created:1733437363,contextLength:3e5,maxOutputTokens:5120,inputPricePerMillion:.06,outputPricePerMillion:.24,modalities:["text","image"]},{id:"amazon/nova-micro-v1",name:"Amazon: Nova Micro 1.0",created:1733437237,contextLength:128e3,maxOutputTokens:5120,inputPricePerMillion:.035,outputPricePerMillion:.14,modalities:["text"]},{id:"amazon/nova-pro-v1",name:"Amazon: Nova Pro 1.0",created:1733436303,contextLength:3e5,maxOutputTokens:5120,inputPricePerMillion:.7999999999999999,outputPricePerMillion:3.1999999999999997,modalities:["text","image"]},{id:"openai/gpt-4o-2024-11-20",name:"OpenAI: GPT-4o (2024-11-20)",created:1732127594,contextLength:128e3,maxOutputTokens:16384,inputPricePerMillion:2.5,outputPricePerMillion:10,modalities:["text","image","file"]},{id:"mistralai/mistral-large-2411",name:"Mistral Large 2411",created:1731978685,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:2,outputPricePerMillion:6,modalities:["text","file"]},{id:"mistralai/mistral-large-2407",name:"Mistral Large 2407",created:1731978415,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:2,outputPricePerMillion:6,modalities:["text","file"]},{id:"mistralai/pixtral-large-2411",name:"Mistral: Pixtral Large 2411",created:1731977388,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:2,outputPricePerMillion:6,modalities:["text","image","file"]},{id:"qwen/qwen-2.5-coder-32b-instruct",name:"Qwen2.5 Coder 32B Instruct",created:1731368400,contextLength:32768,maxOutputTokens:32768,inputPricePerMillion:.66,outputPricePerMillion:1,modalities:["text"]},{id:"thedrummer/unslopnemo-12b",name:"TheDrummer: UnslopNemo 12B",created:1731103448,contextLength:32768,maxOutputTokens:32768,inputPricePerMillion:.39999999999999997,outputPricePerMillion:.39999999999999997,modalities:["text"]},{id:"anthropic/claude-3.5-haiku",name:"Anthropic: Claude 3.5 Haiku",created:1730678400,contextLength:2e5,maxOutputTokens:8192,inputPricePerMillion:.7999999999999999,outputPricePerMillion:4,modalities:["text","image"]},{id:"anthracite-org/magnum-v4-72b",name:"Magnum v4 72B",created:1729555200,contextLength:16384,maxOutputTokens:2048,inputPricePerMillion:3,outputPricePerMillion:5,modalities:["text"]},{id:"qwen/qwen-2.5-7b-instruct",name:"Qwen: Qwen2.5 7B Instruct",created:1729036800,contextLength:32768,maxOutputTokens:32768,inputPricePerMillion:.04,outputPricePerMillion:.09999999999999999,modalities:["text"]},{id:"inflection/inflection-3-productivity",name:"Inflection: Inflection 3 Productivity",created:1728604800,contextLength:8e3,maxOutputTokens:1024,inputPricePerMillion:2.5,outputPricePerMillion:10,modalities:["text"]},{id:"inflection/inflection-3-pi",name:"Inflection: Inflection 3 Pi",created:1728604800,contextLength:8e3,maxOutputTokens:1024,inputPricePerMillion:2.5,outputPricePerMillion:10,modalities:["text"]},{id:"thedrummer/rocinante-12b",name:"TheDrummer: Rocinante 12B",created:1727654400,contextLength:32768,maxOutputTokens:32768,inputPricePerMillion:.16999999999999998,outputPricePerMillion:.43,modalities:["text"]},{id:"meta-llama/llama-3.2-11b-vision-instruct",name:"Meta: Llama 3.2 11B Vision Instruct",created:1727222400,contextLength:131072,maxOutputTokens:16384,inputPricePerMillion:.245,outputPricePerMillion:.245,modalities:["text","image"]},{id:"meta-llama/llama-3.2-1b-instruct",name:"Meta: Llama 3.2 1B Instruct",created:1727222400,contextLength:6e4,maxOutputTokens:6e4,inputPricePerMillion:.027,outputPricePerMillion:.201,modalities:["text"]},{id:"meta-llama/llama-3.2-3b-instruct:free",name:"Meta: Llama 3.2 3B Instruct (free)",created:1727222400,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"meta-llama/llama-3.2-3b-instruct",name:"Meta: Llama 3.2 3B Instruct",created:1727222400,contextLength:8e4,maxOutputTokens:8e4,inputPricePerMillion:.0509,outputPricePerMillion:.335,modalities:["text"]},{id:"qwen/qwen-2.5-72b-instruct",name:"Qwen2.5 72B Instruct",created:1726704e3,contextLength:32768,maxOutputTokens:16384,inputPricePerMillion:.36,outputPricePerMillion:.39999999999999997,modalities:["text"]},{id:"cohere/command-r-08-2024",name:"Cohere: Command R (08-2024)",created:1724976e3,contextLength:128e3,maxOutputTokens:4e3,inputPricePerMillion:.15,outputPricePerMillion:.6,modalities:["text"]},{id:"cohere/command-r-plus-08-2024",name:"Cohere: Command R+ (08-2024)",created:1724976e3,contextLength:128e3,maxOutputTokens:4e3,inputPricePerMillion:2.5,outputPricePerMillion:10,modalities:["text"]},{id:"sao10k/l3.1-euryale-70b",name:"Sao10K: Llama 3.1 Euryale 70B v2.2",created:1724803200,contextLength:131072,maxOutputTokens:16384,inputPricePerMillion:.85,outputPricePerMillion:.85,modalities:["text"]},{id:"nousresearch/hermes-3-llama-3.1-70b",name:"Nous: Hermes 3 70B Instruct",created:1723939200,contextLength:131072,maxOutputTokens:16384,inputPricePerMillion:.3,outputPricePerMillion:.3,modalities:["text"]},{id:"nousresearch/hermes-3-llama-3.1-405b:free",name:"Nous: Hermes 3 405B Instruct (free)",created:1723766400,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:0,outputPricePerMillion:0,modalities:["text"]},{id:"nousresearch/hermes-3-llama-3.1-405b",name:"Nous: Hermes 3 405B Instruct",created:1723766400,contextLength:131072,maxOutputTokens:16384,inputPricePerMillion:1,outputPricePerMillion:1,modalities:["text"]},{id:"sao10k/l3-lunaris-8b",name:"Sao10K: Llama 3 8B Lunaris",created:1723507200,contextLength:8192,maxOutputTokens:16384,inputPricePerMillion:.04,outputPricePerMillion:.049999999999999996,modalities:["text"]},{id:"openai/gpt-4o-2024-08-06",name:"OpenAI: GPT-4o (2024-08-06)",created:1722902400,contextLength:128e3,maxOutputTokens:16384,inputPricePerMillion:2.5,outputPricePerMillion:10,modalities:["text","image","file"]},{id:"meta-llama/llama-3.1-70b-instruct",name:"Meta: Llama 3.1 70B Instruct",created:1721692800,contextLength:131072,maxOutputTokens:16384,inputPricePerMillion:.39999999999999997,outputPricePerMillion:.39999999999999997,modalities:["text"]},{id:"meta-llama/llama-3.1-8b-instruct",name:"Meta: Llama 3.1 8B Instruct",created:1721692800,contextLength:16384,maxOutputTokens:16384,inputPricePerMillion:.02,outputPricePerMillion:.049999999999999996,modalities:["text"]},{id:"mistralai/mistral-nemo",name:"Mistral: Mistral Nemo",created:1721347200,contextLength:131072,maxOutputTokens:0,inputPricePerMillion:.02,outputPricePerMillion:.03,modalities:["text"]},{id:"openai/gpt-4o-mini-2024-07-18",name:"OpenAI: GPT-4o-mini (2024-07-18)",created:1721260800,contextLength:128e3,maxOutputTokens:16384,inputPricePerMillion:.15,outputPricePerMillion:.6,modalities:["text","image","file"]},{id:"openai/gpt-4o-mini",name:"OpenAI: GPT-4o-mini",created:1721260800,contextLength:128e3,maxOutputTokens:16384,inputPricePerMillion:.15,outputPricePerMillion:.6,modalities:["text","image","file"]},{id:"google/gemma-2-27b-it",name:"Google: Gemma 2 27B",created:1720828800,contextLength:8192,maxOutputTokens:2048,inputPricePerMillion:.65,outputPricePerMillion:.65,modalities:["text"]},{id:"sao10k/l3-euryale-70b",name:"Sao10k: Llama 3 Euryale 70B v2.1",created:1718668800,contextLength:8192,maxOutputTokens:8192,inputPricePerMillion:1.48,outputPricePerMillion:1.48,modalities:["text"]},{id:"nousresearch/hermes-2-pro-llama-3-8b",name:"NousResearch: Hermes 2 Pro - Llama-3 8B",created:1716768e3,contextLength:8192,maxOutputTokens:8192,inputPricePerMillion:.14,outputPricePerMillion:.14,modalities:["text"]},{id:"openai/gpt-4o",name:"OpenAI: GPT-4o",created:1715558400,contextLength:128e3,maxOutputTokens:16384,inputPricePerMillion:2.5,outputPricePerMillion:10,modalities:["text","image","file"]},{id:"openai/gpt-4o-2024-05-13",name:"OpenAI: GPT-4o (2024-05-13)",created:1715558400,contextLength:128e3,maxOutputTokens:4096,inputPricePerMillion:5,outputPricePerMillion:15,modalities:["text","image","file"]},{id:"meta-llama/llama-3-70b-instruct",name:"Meta: Llama 3 70B Instruct",created:1713398400,contextLength:8192,maxOutputTokens:8e3,inputPricePerMillion:.51,outputPricePerMillion:.74,modalities:["text"]},{id:"meta-llama/llama-3-8b-instruct",name:"Meta: Llama 3 8B Instruct",created:1713398400,contextLength:8192,maxOutputTokens:8192,inputPricePerMillion:.04,outputPricePerMillion:.04,modalities:["text"]},{id:"mistralai/mixtral-8x22b-instruct",name:"Mistral: Mixtral 8x22B Instruct",created:1713312e3,contextLength:65536,maxOutputTokens:0,inputPricePerMillion:2,outputPricePerMillion:6,modalities:["text","file"]},{id:"microsoft/wizardlm-2-8x22b",name:"WizardLM-2 8x22B",created:1713225600,contextLength:65535,maxOutputTokens:8e3,inputPricePerMillion:.62,outputPricePerMillion:.62,modalities:["text"]},{id:"openai/gpt-4-turbo",name:"OpenAI: GPT-4 Turbo",created:1712620800,contextLength:128e3,maxOutputTokens:4096,inputPricePerMillion:10,outputPricePerMillion:30,modalities:["text","image"]},{id:"anthropic/claude-3-haiku",name:"Anthropic: Claude 3 Haiku",created:1710288e3,contextLength:2e5,maxOutputTokens:4096,inputPricePerMillion:.25,outputPricePerMillion:1.25,modalities:["text","image"]},{id:"mistralai/mistral-large",name:"Mistral Large",created:1708905600,contextLength:128e3,maxOutputTokens:0,inputPricePerMillion:2,outputPricePerMillion:6,modalities:["text","file"]},{id:"openai/gpt-3.5-turbo-0613",name:"OpenAI: GPT-3.5 Turbo (older v0613)",created:1706140800,contextLength:4095,maxOutputTokens:4096,inputPricePerMillion:1,outputPricePerMillion:2,modalities:["text"]},{id:"openai/gpt-4-turbo-preview",name:"OpenAI: GPT-4 Turbo Preview",created:1706140800,contextLength:128e3,maxOutputTokens:4096,inputPricePerMillion:10,outputPricePerMillion:30,modalities:["text"]},{id:"openrouter/auto",name:"Auto Router",created:1699401600,contextLength:2e6,maxOutputTokens:0,inputPricePerMillion:-1e6,outputPricePerMillion:-1e6,modalities:["text","image","audio","file","video"]},{id:"openai/gpt-4-1106-preview",name:"OpenAI: GPT-4 Turbo (older v1106)",created:1699228800,contextLength:128e3,maxOutputTokens:4096,inputPricePerMillion:10,outputPricePerMillion:30,modalities:["text"]},{id:"mistralai/mistral-7b-instruct-v0.1",name:"Mistral: Mistral 7B Instruct v0.1",created:1695859200,contextLength:2824,maxOutputTokens:2824,inputPricePerMillion:.11,outputPricePerMillion:.19,modalities:["text"]},{id:"openai/gpt-3.5-turbo-instruct",name:"OpenAI: GPT-3.5 Turbo Instruct",created:1695859200,contextLength:4095,maxOutputTokens:4096,inputPricePerMillion:1.5,outputPricePerMillion:2,modalities:["text"]},{id:"openai/gpt-3.5-turbo-16k",name:"OpenAI: GPT-3.5 Turbo 16k",created:1693180800,contextLength:16385,maxOutputTokens:4096,inputPricePerMillion:3,outputPricePerMillion:4,modalities:["text"]},{id:"mancer/weaver",name:"Mancer: Weaver (alpha)",created:1690934400,contextLength:8e3,maxOutputTokens:2e3,inputPricePerMillion:.75,outputPricePerMillion:1,modalities:["text"]},{id:"undi95/remm-slerp-l2-13b",name:"ReMM SLERP 13B",created:1689984e3,contextLength:6144,maxOutputTokens:4096,inputPricePerMillion:.44999999999999996,outputPricePerMillion:.65,modalities:["text"]},{id:"gryphe/mythomax-l2-13b",name:"MythoMax 13B",created:1688256e3,contextLength:4096,maxOutputTokens:4096,inputPricePerMillion:.06,outputPricePerMillion:.06,modalities:["text"]},{id:"openai/gpt-4-0314",name:"OpenAI: GPT-4 (older v0314)",created:1685232e3,contextLength:8191,maxOutputTokens:4096,inputPricePerMillion:30,outputPricePerMillion:60,modalities:["text"]},{id:"openai/gpt-3.5-turbo",name:"OpenAI: GPT-3.5 Turbo",created:1685232e3,contextLength:16385,maxOutputTokens:4096,inputPricePerMillion:.5,outputPricePerMillion:1.5,modalities:["text"]},{id:"openai/gpt-4",name:"OpenAI: GPT-4",created:1685232e3,contextLength:8191,maxOutputTokens:4096,inputPricePerMillion:30,outputPricePerMillion:60,modalities:["text"]}]};var c=a,r=null;function i(){return r??c}a$1(i,"loadSnapshot");function s(t){r=t;}a$1(s,"setOpenRouterSnapshot");function x(){return i()}a$1(x,"getOpenRouterSnapshot");function M(){return i().models}a$1(M,"getOpenRouterModels");function g(t){return i().models.find(n=>n.id===t)}a$1(g,"findOpenRouterModel");function h(t){let n=`${t.toLowerCase()}/`;return i().models.filter(l=>l.id.toLowerCase().startsWith(n))}a$1(h,"listOpenRouterModelsByVendor");
|
|
2
|
+
export{s as a,x as b,M as c,g as d,h as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {h,a}from'./chunk-3QP5BQ3L.js';import {mkdirSync,createWriteStream}from'fs';import {homedir}from'os';import {join}from'path';h();function p(){let r=process.env.CODESHELL_RENDER_DEBUG;return r?r==="verbose"?"verbose":"summary":"off"}a(p,"detectMode");var d=p(),c=null;function v(){if(d==="off")return null;if(c)return c;let r=join(homedir(),".code-shell","logs","ui-ink");try{mkdirSync(r,{recursive:!0}),c=createWriteStream(join(r,"render-perf.log"),{flags:"a"});}catch{return null}return c}a(v,"getStream");var o=[],n=Date.now();function M(r){if(d==="off")return;let e=r.phases;if(!e)return;o.length===0&&(n=Date.now());let i={durMs:r.durationMs,dirtyNodes:e.yogaVisited,patches:e.patches,yogaCacheHits:e.yogaCacheHits,yogaLive:e.yogaLive};if(d==="verbose"){y({t:Date.now(),kind:"frame",...i});return}o.push(i);let u=Date.now();u-n>=1e3&&N(u);}a(M,"recordFrame");function N(r){if(o.length===0){n=r;return}let e=o.reduce((s,a)=>({durMs:s.durMs+a.durMs,dirtyNodes:s.dirtyNodes+a.dirtyNodes,patches:s.patches+a.patches,yogaCacheHits:s.yogaCacheHits+a.yogaCacheHits,yogaLive:Math.max(s.yogaLive,a.yogaLive)}),{durMs:0,dirtyNodes:0,patches:0,yogaCacheHits:0,yogaLive:0}),i=o.length,u=e.dirtyNodes===0?0:e.yogaCacheHits/e.dirtyNodes;y({t:r,kind:"summary",windowMs:r-n,frames:i,avgFrameMs:Number((e.durMs/i).toFixed(2)),dirtyNodes:e.dirtyNodes,patches:e.patches,cacheHitRatio:Number(u.toFixed(3)),yogaLive:e.yogaLive}),o.length=0,n=r;}a(N,"flushSummary");function y(r){let e=v();e&&e.write(JSON.stringify(r)+`
|
|
2
|
+
`);}a(y,"write");var C={enabled:d!=="off",mode:d,recordFrame:M};export{M as a,C as b};
|