pi-usereq 0.49.0 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +5 -1
- package/scripts/lib/extension-debug-harness.ts +443 -0
- package/scripts/lib/recording-extension-api.ts +855 -0
- package/scripts/lib/sdk-smoke.ts +503 -0
- package/src/core/extension-status.ts +13 -4
- package/src/index.ts +105 -71
- package/.g.conf +0 -16
- package/.github/workflows/release-npm.yml +0 -134
- package/.gitignore +0 -274
- package/CHANGELOG.md +0 -706
- package/TODO.md +0 -20
- package/docs/pi.dev/agent-document-manifest.json +0 -6399
- package/docs/pi.dev/coding-agent-docs/compaction.md +0 -394
- package/docs/pi.dev/coding-agent-docs/custom-provider.md +0 -637
- package/docs/pi.dev/coding-agent-docs/development.md +0 -71
- package/docs/pi.dev/coding-agent-docs/extensions.md +0 -2536
- package/docs/pi.dev/coding-agent-docs/images/doom-extension.png +0 -0
- package/docs/pi.dev/coding-agent-docs/images/exy.png +0 -0
- package/docs/pi.dev/coding-agent-docs/images/interactive-mode.png +0 -0
- package/docs/pi.dev/coding-agent-docs/images/tree-view.png +0 -0
- package/docs/pi.dev/coding-agent-docs/json.md +0 -82
- package/docs/pi.dev/coding-agent-docs/keybindings.md +0 -197
- package/docs/pi.dev/coding-agent-docs/models.md +0 -395
- package/docs/pi.dev/coding-agent-docs/packages.md +0 -218
- package/docs/pi.dev/coding-agent-docs/prompt-templates.md +0 -88
- package/docs/pi.dev/coding-agent-docs/providers.md +0 -196
- package/docs/pi.dev/coding-agent-docs/rpc.md +0 -1407
- package/docs/pi.dev/coding-agent-docs/sdk.md +0 -1149
- package/docs/pi.dev/coding-agent-docs/session.md +0 -412
- package/docs/pi.dev/coding-agent-docs/settings.md +0 -248
- package/docs/pi.dev/coding-agent-docs/shell-aliases.md +0 -13
- package/docs/pi.dev/coding-agent-docs/skills.md +0 -232
- package/docs/pi.dev/coding-agent-docs/terminal-setup.md +0 -106
- package/docs/pi.dev/coding-agent-docs/termux.md +0 -127
- package/docs/pi.dev/coding-agent-docs/themes.md +0 -295
- package/docs/pi.dev/coding-agent-docs/tmux.md +0 -61
- package/docs/pi.dev/coding-agent-docs/tree.md +0 -233
- package/docs/pi.dev/coding-agent-docs/tui.md +0 -918
- package/docs/pi.dev/coding-agent-docs/windows.md +0 -17
- package/docs/pi.dev/mom-docs/artifacts-server.md +0 -475
- package/docs/pi.dev/mom-docs/events.md +0 -307
- package/docs/pi.dev/mom-docs/new.md +0 -970
- package/docs/pi.dev/mom-docs/sandbox.md +0 -153
- package/docs/pi.dev/mom-docs/slack-bot-minimal-guide.md +0 -399
- package/docs/pi.dev/mom-docs/v86.md +0 -319
- package/docs/pi.dev/pods-docs/gml-4.5.md +0 -189
- package/docs/pi.dev/pods-docs/gpt-oss.md +0 -233
- package/docs/pi.dev/pods-docs/implementation-plan.md +0 -183
- package/docs/pi.dev/pods-docs/kimi-k2.md +0 -197
- package/docs/pi.dev/pods-docs/models.md +0 -116
- package/docs/pi.dev/pods-docs/plan.md +0 -166
- package/docs/pi.dev/pods-docs/qwen3-coder.md +0 -132
- package/images/flowchart-bw.png +0 -0
- package/images/flowchart-bw.svg +0 -102
- package/images/flowchart.md +0 -100
- package/images/flowchart.png +0 -0
- package/images/flowchart.svg +0 -3
- package/pi-usereq/docs/REFERENCES.md +0 -5713
- package/pi-usereq/docs/REQUIREMENTS.md +0 -781
- package/pi-usereq/docs/WORKFLOW.md +0 -1341
- package/pi.dev-src/pi-mono/agent/src/agent-loop.ts +0 -683
- package/pi.dev-src/pi-mono/agent/src/agent.ts +0 -543
- package/pi.dev-src/pi-mono/agent/src/index.ts +0 -8
- package/pi.dev-src/pi-mono/agent/src/proxy.ts +0 -367
- package/pi.dev-src/pi-mono/agent/src/types.ts +0 -364
- package/pi.dev-src/pi-mono/agent/test/agent-loop.test.ts +0 -1181
- package/pi.dev-src/pi-mono/agent/test/agent.test.ts +0 -463
- package/pi.dev-src/pi-mono/agent/test/e2e.test.ts +0 -404
- package/pi.dev-src/pi-mono/agent/test/utils/calculate.ts +0 -32
- package/pi.dev-src/pi-mono/agent/test/utils/get-current-time.ts +0 -46
- package/pi.dev-src/pi-mono/agent/vitest.config.ts +0 -9
- package/pi.dev-src/pi-mono/ai/bedrock-provider.d.ts +0 -1
- package/pi.dev-src/pi-mono/ai/bedrock-provider.js +0 -1
- package/pi.dev-src/pi-mono/ai/scripts/generate-models.ts +0 -1635
- package/pi.dev-src/pi-mono/ai/scripts/generate-test-image.ts +0 -34
- package/pi.dev-src/pi-mono/ai/src/api-registry.ts +0 -98
- package/pi.dev-src/pi-mono/ai/src/bedrock-provider.ts +0 -6
- package/pi.dev-src/pi-mono/ai/src/cli.ts +0 -133
- package/pi.dev-src/pi-mono/ai/src/env-api-keys.ts +0 -134
- package/pi.dev-src/pi-mono/ai/src/index.ts +0 -35
- package/pi.dev-src/pi-mono/ai/src/models.generated.ts +0 -14928
- package/pi.dev-src/pi-mono/ai/src/models.ts +0 -82
- package/pi.dev-src/pi-mono/ai/src/oauth.ts +0 -1
- package/pi.dev-src/pi-mono/ai/src/providers/amazon-bedrock.ts +0 -929
- package/pi.dev-src/pi-mono/ai/src/providers/anthropic.ts +0 -1125
- package/pi.dev-src/pi-mono/ai/src/providers/azure-openai-responses.ts +0 -253
- package/pi.dev-src/pi-mono/ai/src/providers/faux.ts +0 -499
- package/pi.dev-src/pi-mono/ai/src/providers/github-copilot-headers.ts +0 -37
- package/pi.dev-src/pi-mono/ai/src/providers/google-gemini-cli.ts +0 -996
- package/pi.dev-src/pi-mono/ai/src/providers/google-shared.ts +0 -354
- package/pi.dev-src/pi-mono/ai/src/providers/google-vertex.ts +0 -543
- package/pi.dev-src/pi-mono/ai/src/providers/google.ts +0 -500
- package/pi.dev-src/pi-mono/ai/src/providers/mistral.ts +0 -629
- package/pi.dev-src/pi-mono/ai/src/providers/openai-codex-responses.ts +0 -984
- package/pi.dev-src/pi-mono/ai/src/providers/openai-completions.ts +0 -1063
- package/pi.dev-src/pi-mono/ai/src/providers/openai-responses-shared.ts +0 -539
- package/pi.dev-src/pi-mono/ai/src/providers/openai-responses.ts +0 -264
- package/pi.dev-src/pi-mono/ai/src/providers/register-builtins.ts +0 -433
- package/pi.dev-src/pi-mono/ai/src/providers/simple-options.ts +0 -47
- package/pi.dev-src/pi-mono/ai/src/providers/transform-messages.ts +0 -220
- package/pi.dev-src/pi-mono/ai/src/stream.ts +0 -59
- package/pi.dev-src/pi-mono/ai/src/types.ts +0 -417
- package/pi.dev-src/pi-mono/ai/src/utils/event-stream.ts +0 -87
- package/pi.dev-src/pi-mono/ai/src/utils/hash.ts +0 -13
- package/pi.dev-src/pi-mono/ai/src/utils/headers.ts +0 -7
- package/pi.dev-src/pi-mono/ai/src/utils/json-parse.ts +0 -124
- package/pi.dev-src/pi-mono/ai/src/utils/overflow.ts +0 -138
- package/pi.dev-src/pi-mono/ai/src/utils/sanitize-unicode.ts +0 -25
- package/pi.dev-src/pi-mono/ai/src/utils/typebox-helpers.ts +0 -24
- package/pi.dev-src/pi-mono/ai/src/utils/validation.ts +0 -324
- package/pi.dev-src/pi-mono/ai/test/abort.test.ts +0 -260
- package/pi.dev-src/pi-mono/ai/test/anthropic-oauth.test.ts +0 -99
- package/pi.dev-src/pi-mono/ai/test/anthropic-opus-4-7-smoke.test.ts +0 -72
- package/pi.dev-src/pi-mono/ai/test/anthropic-sse-parsing.test.ts +0 -113
- package/pi.dev-src/pi-mono/ai/test/anthropic-thinking-disable.test.ts +0 -152
- package/pi.dev-src/pi-mono/ai/test/anthropic-tool-name-normalization.test.ts +0 -205
- package/pi.dev-src/pi-mono/ai/test/azure-utils.ts +0 -28
- package/pi.dev-src/pi-mono/ai/test/bedrock-endpoint-resolution.test.ts +0 -131
- package/pi.dev-src/pi-mono/ai/test/bedrock-models.test.ts +0 -66
- package/pi.dev-src/pi-mono/ai/test/bedrock-thinking-payload.test.ts +0 -107
- package/pi.dev-src/pi-mono/ai/test/bedrock-utils.ts +0 -18
- package/pi.dev-src/pi-mono/ai/test/cache-retention.test.ts +0 -335
- package/pi.dev-src/pi-mono/ai/test/context-overflow.test.ts +0 -714
- package/pi.dev-src/pi-mono/ai/test/cross-provider-handoff.test.ts +0 -458
- package/pi.dev-src/pi-mono/ai/test/data/red-circle.png +0 -0
- package/pi.dev-src/pi-mono/ai/test/empty.test.ts +0 -742
- package/pi.dev-src/pi-mono/ai/test/faux-provider.test.ts +0 -597
- package/pi.dev-src/pi-mono/ai/test/fireworks-models.test.ts +0 -49
- package/pi.dev-src/pi-mono/ai/test/github-copilot-anthropic.test.ts +0 -108
- package/pi.dev-src/pi-mono/ai/test/github-copilot-oauth.test.ts +0 -196
- package/pi.dev-src/pi-mono/ai/test/google-gemini-cli-claude-thinking-header.test.ts +0 -103
- package/pi.dev-src/pi-mono/ai/test/google-gemini-cli-empty-stream.test.ts +0 -108
- package/pi.dev-src/pi-mono/ai/test/google-gemini-cli-retry-delay.test.ts +0 -53
- package/pi.dev-src/pi-mono/ai/test/google-shared-convert-tools.test.ts +0 -187
- package/pi.dev-src/pi-mono/ai/test/google-shared-gemini3-unsigned-tool-call.test.ts +0 -172
- package/pi.dev-src/pi-mono/ai/test/google-shared-image-tool-result-routing.test.ts +0 -124
- package/pi.dev-src/pi-mono/ai/test/google-thinking-disable.test.ts +0 -183
- package/pi.dev-src/pi-mono/ai/test/google-thinking-signature.test.ts +0 -38
- package/pi.dev-src/pi-mono/ai/test/google-tool-call-missing-args.test.ts +0 -105
- package/pi.dev-src/pi-mono/ai/test/google-vertex-api-key-resolution.test.ts +0 -144
- package/pi.dev-src/pi-mono/ai/test/image-tool-result.test.ts +0 -481
- package/pi.dev-src/pi-mono/ai/test/interleaved-thinking.test.ts +0 -145
- package/pi.dev-src/pi-mono/ai/test/lazy-module-load.test.ts +0 -102
- package/pi.dev-src/pi-mono/ai/test/mistral-reasoning-mode.test.ts +0 -66
- package/pi.dev-src/pi-mono/ai/test/mistral-tool-schema.test.ts +0 -61
- package/pi.dev-src/pi-mono/ai/test/oauth.ts +0 -89
- package/pi.dev-src/pi-mono/ai/test/openai-codex-cache-affinity-e2e.test.ts +0 -36
- package/pi.dev-src/pi-mono/ai/test/openai-codex-stream.test.ts +0 -686
- package/pi.dev-src/pi-mono/ai/test/openai-completions-cache-control-format.test.ts +0 -189
- package/pi.dev-src/pi-mono/ai/test/openai-completions-prompt-cache.test.ts +0 -198
- package/pi.dev-src/pi-mono/ai/test/openai-completions-thinking-as-text.test.ts +0 -214
- package/pi.dev-src/pi-mono/ai/test/openai-completions-tool-choice.test.ts +0 -560
- package/pi.dev-src/pi-mono/ai/test/openai-completions-tool-result-images.test.ts +0 -101
- package/pi.dev-src/pi-mono/ai/test/openai-responses-cache-affinity-e2e.test.ts +0 -32
- package/pi.dev-src/pi-mono/ai/test/openai-responses-copilot-provider.test.ts +0 -128
- package/pi.dev-src/pi-mono/ai/test/openai-responses-foreign-toolcall-id.test.ts +0 -66
- package/pi.dev-src/pi-mono/ai/test/openai-responses-partial-json-cleanup.test.ts +0 -101
- package/pi.dev-src/pi-mono/ai/test/openai-responses-reasoning-replay-e2e.test.ts +0 -292
- package/pi.dev-src/pi-mono/ai/test/openai-responses-tool-result-images.test.ts +0 -200
- package/pi.dev-src/pi-mono/ai/test/openrouter-cache-write-repro.test.ts +0 -78
- package/pi.dev-src/pi-mono/ai/test/overflow.test.ts +0 -64
- package/pi.dev-src/pi-mono/ai/test/responseid.test.ts +0 -145
- package/pi.dev-src/pi-mono/ai/test/stream.test.ts +0 -1405
- package/pi.dev-src/pi-mono/ai/test/supports-xhigh.test.ts +0 -34
- package/pi.dev-src/pi-mono/ai/test/tokens.test.ts +0 -304
- package/pi.dev-src/pi-mono/ai/test/tool-call-id-normalization.test.ts +0 -291
- package/pi.dev-src/pi-mono/ai/test/tool-call-without-result.test.ts +0 -313
- package/pi.dev-src/pi-mono/ai/test/total-tokens.test.ts +0 -695
- package/pi.dev-src/pi-mono/ai/test/transform-messages-copilot-openai-to-anthropic.test.ts +0 -191
- package/pi.dev-src/pi-mono/ai/test/unicode-surrogate.test.ts +0 -754
- package/pi.dev-src/pi-mono/ai/test/validation.test.ts +0 -116
- package/pi.dev-src/pi-mono/ai/test/xhigh.test.ts +0 -71
- package/pi.dev-src/pi-mono/ai/test/zen.test.ts +0 -25
- package/pi.dev-src/pi-mono/ai/vitest.config.ts +0 -9
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/antigravity-image-gen.ts +0 -418
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/auto-commit-on-exit.ts +0 -49
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/bash-spawn-hook.ts +0 -30
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/bookmark.ts +0 -50
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/built-in-tool-renderer.ts +0 -249
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/claude-rules.ts +0 -86
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/commands.ts +0 -72
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/confirm-destructive.ts +0 -59
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-compaction.ts +0 -127
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-footer.ts +0 -64
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-header.ts +0 -73
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-provider-anthropic/index.ts +0 -604
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-provider-anthropic/package-lock.json +0 -24
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-provider-gitlab-duo/index.ts +0 -349
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-provider-gitlab-duo/test.ts +0 -82
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/custom-provider-qwen-cli/index.ts +0 -345
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/dirty-repo-guard.ts +0 -56
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/doom-overlay/doom/build.sh +0 -152
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +0 -72
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/doom-overlay/doom-component.ts +0 -132
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/doom-overlay/doom-engine.ts +0 -173
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/doom-overlay/doom-keys.ts +0 -104
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/doom-overlay/index.ts +0 -74
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/doom-overlay/wad-finder.ts +0 -51
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/dynamic-resources/SKILL.md +0 -8
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/dynamic-resources/dynamic.json +0 -79
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/dynamic-resources/dynamic.md +0 -5
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/dynamic-resources/index.ts +0 -15
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/dynamic-tools.ts +0 -74
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/event-bus.ts +0 -43
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/file-trigger.ts +0 -41
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/git-checkpoint.ts +0 -53
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/github-issue-autocomplete.ts +0 -185
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/handoff.ts +0 -153
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/hello.ts +0 -26
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/hidden-thinking-label.ts +0 -53
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/inline-bash.ts +0 -94
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/input-transform.ts +0 -43
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/interactive-shell.ts +0 -196
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/mac-system-theme.ts +0 -47
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/message-renderer.ts +0 -59
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/minimal-mode.ts +0 -426
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/modal-editor.ts +0 -85
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/model-status.ts +0 -31
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/notify.ts +0 -55
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/overlay-qa-tests.ts +0 -1348
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/overlay-test.ts +0 -150
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/permission-gate.ts +0 -34
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/pirate.ts +0 -47
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/plan-mode/index.ts +0 -340
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/plan-mode/utils.ts +0 -168
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/preset.ts +0 -430
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/prompt-customizer.ts +0 -97
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/protected-paths.ts +0 -30
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/provider-payload.ts +0 -18
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/qna.ts +0 -122
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/question.ts +0 -264
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/questionnaire.ts +0 -427
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/rainbow-editor.ts +0 -88
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/reload-runtime.ts +0 -37
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/rpc-demo.ts +0 -118
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/sandbox/index.ts +0 -321
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/sandbox/package-lock.json +0 -92
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/send-user-message.ts +0 -97
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/session-name.ts +0 -27
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/shutdown-command.ts +0 -63
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/snake.ts +0 -343
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/space-invaders.ts +0 -560
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/ssh.ts +0 -220
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/status-line.ts +0 -32
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/structured-output.ts +0 -65
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/agents/planner.md +0 -37
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/agents/reviewer.md +0 -35
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/agents/scout.md +0 -50
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/agents/worker.md +0 -24
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/agents.ts +0 -126
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/index.ts +0 -987
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/prompts/implement-and-review.md +0 -10
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/prompts/implement.md +0 -10
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/subagent/prompts/scout-and-plan.md +0 -9
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/summarize.ts +0 -206
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/system-prompt-header.ts +0 -17
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/tic-tac-toe.ts +0 -1008
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/timed-confirm.ts +0 -70
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/titlebar-spinner.ts +0 -58
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/todo.ts +0 -297
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/tool-override.ts +0 -144
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/tools.ts +0 -141
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/trigger-compact.ts +0 -50
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/truncated-tool.ts +0 -195
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/widget-placement.ts +0 -9
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/with-deps/index.ts +0 -32
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/with-deps/package-lock.json +0 -31
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/working-indicator.ts +0 -123
- package/pi.dev-src/pi-mono/coding-agent/examples/extensions/working-message-test.ts +0 -25
- package/pi.dev-src/pi-mono/coding-agent/examples/rpc-extension-ui.ts +0 -632
- package/pi.dev-src/pi-mono/coding-agent/examples/sdk/01-minimal.ts +0 -22
- package/pi.dev-src/pi-mono/coding-agent/examples/sdk/02-custom-model.ts +0 -49
- package/pi.dev-src/pi-mono/coding-agent/examples/sdk/03-custom-prompt.ts +0 -62
- package/pi.dev-src/pi-mono/coding-agent/examples/sdk/04-skills.ts +0 -55
- package/pi.dev-src/pi-mono/coding-agent/examples/sdk/05-tools.ts +0 -44
- package/pi.dev-src/pi-mono/coding-agent/examples/sdk/06-extensions.ts +0 -90
- package/pi.dev-src/pi-mono/coding-agent/examples/sdk/07-context-files.ts +0 -42
- package/pi.dev-src/pi-mono/coding-agent/examples/sdk/08-prompt-templates.ts +0 -51
- package/pi.dev-src/pi-mono/coding-agent/examples/sdk/09-api-keys-and-oauth.ts +0 -48
- package/pi.dev-src/pi-mono/coding-agent/examples/sdk/10-settings.ts +0 -53
- package/pi.dev-src/pi-mono/coding-agent/examples/sdk/11-sessions.ts +0 -48
- package/pi.dev-src/pi-mono/coding-agent/examples/sdk/12-full-control.ts +0 -73
- package/pi.dev-src/pi-mono/coding-agent/examples/sdk/13-session-runtime.ts +0 -67
- package/pi.dev-src/pi-mono/coding-agent/scripts/migrate-sessions.sh +0 -93
- package/pi.dev-src/pi-mono/coding-agent/src/bun/cli.ts +0 -6
- package/pi.dev-src/pi-mono/coding-agent/src/bun/register-bedrock.ts +0 -4
- package/pi.dev-src/pi-mono/coding-agent/src/cli/args.ts +0 -335
- package/pi.dev-src/pi-mono/coding-agent/src/cli/config-selector.ts +0 -52
- package/pi.dev-src/pi-mono/coding-agent/src/cli/file-processor.ts +0 -100
- package/pi.dev-src/pi-mono/coding-agent/src/cli/initial-message.ts +0 -43
- package/pi.dev-src/pi-mono/coding-agent/src/cli/list-models.ts +0 -110
- package/pi.dev-src/pi-mono/coding-agent/src/cli/session-picker.ts +0 -52
- package/pi.dev-src/pi-mono/coding-agent/src/cli.ts +0 -17
- package/pi.dev-src/pi-mono/coding-agent/src/config.ts +0 -261
- package/pi.dev-src/pi-mono/coding-agent/src/core/agent-session-runtime.ts +0 -394
- package/pi.dev-src/pi-mono/coding-agent/src/core/agent-session-services.ts +0 -196
- package/pi.dev-src/pi-mono/coding-agent/src/core/agent-session.ts +0 -3096
- package/pi.dev-src/pi-mono/coding-agent/src/core/auth-storage.ts +0 -493
- package/pi.dev-src/pi-mono/coding-agent/src/core/bash-executor.ts +0 -154
- package/pi.dev-src/pi-mono/coding-agent/src/core/compaction/branch-summarization.ts +0 -355
- package/pi.dev-src/pi-mono/coding-agent/src/core/compaction/compaction.ts +0 -839
- package/pi.dev-src/pi-mono/coding-agent/src/core/compaction/index.ts +0 -7
- package/pi.dev-src/pi-mono/coding-agent/src/core/compaction/utils.ts +0 -170
- package/pi.dev-src/pi-mono/coding-agent/src/core/defaults.ts +0 -3
- package/pi.dev-src/pi-mono/coding-agent/src/core/diagnostics.ts +0 -15
- package/pi.dev-src/pi-mono/coding-agent/src/core/event-bus.ts +0 -33
- package/pi.dev-src/pi-mono/coding-agent/src/core/exec.ts +0 -107
- package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/ansi-to-html.ts +0 -258
- package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/index.ts +0 -314
- package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/template.css +0 -1017
- package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/template.html +0 -55
- package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/template.js +0 -1770
- package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/tool-renderer.ts +0 -158
- package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/vendor/highlight.min.js +0 -1213
- package/pi.dev-src/pi-mono/coding-agent/src/core/export-html/vendor/marked.min.js +0 -6
- package/pi.dev-src/pi-mono/coding-agent/src/core/extensions/index.ts +0 -171
- package/pi.dev-src/pi-mono/coding-agent/src/core/extensions/loader.ts +0 -606
- package/pi.dev-src/pi-mono/coding-agent/src/core/extensions/runner.ts +0 -1019
- package/pi.dev-src/pi-mono/coding-agent/src/core/extensions/types.ts +0 -1542
- package/pi.dev-src/pi-mono/coding-agent/src/core/extensions/wrapper.ts +0 -30
- package/pi.dev-src/pi-mono/coding-agent/src/core/footer-data-provider.ts +0 -354
- package/pi.dev-src/pi-mono/coding-agent/src/core/index.ts +0 -77
- package/pi.dev-src/pi-mono/coding-agent/src/core/keybindings.ts +0 -370
- package/pi.dev-src/pi-mono/coding-agent/src/core/messages.ts +0 -195
- package/pi.dev-src/pi-mono/coding-agent/src/core/model-registry.ts +0 -858
- package/pi.dev-src/pi-mono/coding-agent/src/core/model-resolver.ts +0 -629
- package/pi.dev-src/pi-mono/coding-agent/src/core/output-guard.ts +0 -74
- package/pi.dev-src/pi-mono/coding-agent/src/core/package-manager.ts +0 -2408
- package/pi.dev-src/pi-mono/coding-agent/src/core/prompt-templates.ts +0 -296
- package/pi.dev-src/pi-mono/coding-agent/src/core/resolve-config-value.ts +0 -142
- package/pi.dev-src/pi-mono/coding-agent/src/core/resource-loader.ts +0 -917
- package/pi.dev-src/pi-mono/coding-agent/src/core/sdk.ts +0 -380
- package/pi.dev-src/pi-mono/coding-agent/src/core/session-cwd.ts +0 -59
- package/pi.dev-src/pi-mono/coding-agent/src/core/session-manager.ts +0 -1425
- package/pi.dev-src/pi-mono/coding-agent/src/core/settings-manager.ts +0 -999
- package/pi.dev-src/pi-mono/coding-agent/src/core/skills.ts +0 -508
- package/pi.dev-src/pi-mono/coding-agent/src/core/slash-commands.ts +0 -39
- package/pi.dev-src/pi-mono/coding-agent/src/core/source-info.ts +0 -40
- package/pi.dev-src/pi-mono/coding-agent/src/core/system-prompt.ts +0 -172
- package/pi.dev-src/pi-mono/coding-agent/src/core/telemetry.ts +0 -13
- package/pi.dev-src/pi-mono/coding-agent/src/core/timings.ts +0 -31
- package/pi.dev-src/pi-mono/coding-agent/src/core/tools/bash.ts +0 -448
- package/pi.dev-src/pi-mono/coding-agent/src/core/tools/edit-diff.ts +0 -445
- package/pi.dev-src/pi-mono/coding-agent/src/core/tools/edit.ts +0 -487
- package/pi.dev-src/pi-mono/coding-agent/src/core/tools/file-mutation-queue.ts +0 -39
- package/pi.dev-src/pi-mono/coding-agent/src/core/tools/find.ts +0 -370
- package/pi.dev-src/pi-mono/coding-agent/src/core/tools/grep.ts +0 -384
- package/pi.dev-src/pi-mono/coding-agent/src/core/tools/index.ts +0 -196
- package/pi.dev-src/pi-mono/coding-agent/src/core/tools/ls.ts +0 -229
- package/pi.dev-src/pi-mono/coding-agent/src/core/tools/path-utils.ts +0 -94
- package/pi.dev-src/pi-mono/coding-agent/src/core/tools/read.ts +0 -273
- package/pi.dev-src/pi-mono/coding-agent/src/core/tools/render-utils.ts +0 -64
- package/pi.dev-src/pi-mono/coding-agent/src/core/tools/tool-definition-wrapper.ts +0 -45
- package/pi.dev-src/pi-mono/coding-agent/src/core/tools/truncate.ts +0 -265
- package/pi.dev-src/pi-mono/coding-agent/src/core/tools/write.ts +0 -281
- package/pi.dev-src/pi-mono/coding-agent/src/index.ts +0 -352
- package/pi.dev-src/pi-mono/coding-agent/src/main.ts +0 -731
- package/pi.dev-src/pi-mono/coding-agent/src/migrations.ts +0 -314
- package/pi.dev-src/pi-mono/coding-agent/src/modes/index.ts +0 -9
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/assets/clankolas.png +0 -0
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/armin.ts +0 -382
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/assistant-message.ts +0 -147
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/bash-execution.ts +0 -218
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/bordered-loader.ts +0 -68
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/branch-summary-message.ts +0 -58
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/compaction-summary-message.ts +0 -59
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/config-selector.ts +0 -592
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/countdown-timer.ts +0 -38
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/custom-editor.ts +0 -80
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/custom-message.ts +0 -99
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/daxnuts.ts +0 -164
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/diff.ts +0 -147
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/dynamic-border.ts +0 -25
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/earendil-announcement.ts +0 -53
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/extension-editor.ts +0 -147
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/extension-input.ts +0 -87
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/extension-selector.ts +0 -107
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/footer.ts +0 -220
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/index.ts +0 -32
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/keybinding-hints.ts +0 -24
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/login-dialog.ts +0 -178
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/model-selector.ts +0 -338
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/oauth-selector.ts +0 -121
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/scoped-models-selector.ts +0 -355
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/session-selector-search.ts +0 -194
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/session-selector.ts +0 -1026
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/settings-selector.ts +0 -456
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/show-images-selector.ts +0 -50
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/skill-invocation-message.ts +0 -55
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/theme-selector.ts +0 -67
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/thinking-selector.ts +0 -74
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/tool-execution.ts +0 -352
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/tree-selector.ts +0 -1246
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/user-message-selector.ts +0 -155
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/user-message.ts +0 -35
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/components/visual-truncate.ts +0 -50
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/interactive-mode.ts +0 -5155
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/theme/dark.json +0 -85
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/theme/light.json +0 -84
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/theme/theme-schema.json +0 -335
- package/pi.dev-src/pi-mono/coding-agent/src/modes/interactive/theme/theme.ts +0 -1141
- package/pi.dev-src/pi-mono/coding-agent/src/modes/print-mode.ts +0 -158
- package/pi.dev-src/pi-mono/coding-agent/src/modes/rpc/jsonl.ts +0 -58
- package/pi.dev-src/pi-mono/coding-agent/src/modes/rpc/rpc-client.ts +0 -515
- package/pi.dev-src/pi-mono/coding-agent/src/modes/rpc/rpc-mode.ts +0 -745
- package/pi.dev-src/pi-mono/coding-agent/src/modes/rpc/rpc-types.ts +0 -264
- package/pi.dev-src/pi-mono/coding-agent/src/package-manager-cli.ts +0 -270
- package/pi.dev-src/pi-mono/coding-agent/src/utils/changelog.ts +0 -99
- package/pi.dev-src/pi-mono/coding-agent/src/utils/child-process.ts +0 -86
- package/pi.dev-src/pi-mono/coding-agent/src/utils/clipboard-image.ts +0 -300
- package/pi.dev-src/pi-mono/coding-agent/src/utils/clipboard-native.ts +0 -22
- package/pi.dev-src/pi-mono/coding-agent/src/utils/clipboard.ts +0 -81
- package/pi.dev-src/pi-mono/coding-agent/src/utils/exif-orientation.ts +0 -183
- package/pi.dev-src/pi-mono/coding-agent/src/utils/frontmatter.ts +0 -39
- package/pi.dev-src/pi-mono/coding-agent/src/utils/fs-watch.ts +0 -30
- package/pi.dev-src/pi-mono/coding-agent/src/utils/git.ts +0 -192
- package/pi.dev-src/pi-mono/coding-agent/src/utils/image-convert.ts +0 -41
- package/pi.dev-src/pi-mono/coding-agent/src/utils/image-resize.ts +0 -176
- package/pi.dev-src/pi-mono/coding-agent/src/utils/mime.ts +0 -30
- package/pi.dev-src/pi-mono/coding-agent/src/utils/paths.ts +0 -20
- package/pi.dev-src/pi-mono/coding-agent/src/utils/photon.ts +0 -139
- package/pi.dev-src/pi-mono/coding-agent/src/utils/shell.ts +0 -210
- package/pi.dev-src/pi-mono/coding-agent/src/utils/sleep.ts +0 -18
- package/pi.dev-src/pi-mono/coding-agent/src/utils/tools-manager.ts +0 -287
- package/pi.dev-src/pi-mono/coding-agent/test/agent-session-auto-compaction-queue.test.ts +0 -437
- package/pi.dev-src/pi-mono/coding-agent/test/agent-session-branching.test.ts +0 -156
- package/pi.dev-src/pi-mono/coding-agent/test/agent-session-compaction.test.ts +0 -208
- package/pi.dev-src/pi-mono/coding-agent/test/agent-session-concurrent.test.ts +0 -618
- package/pi.dev-src/pi-mono/coding-agent/test/agent-session-dynamic-provider.test.ts +0 -117
- package/pi.dev-src/pi-mono/coding-agent/test/agent-session-dynamic-tools.test.ts +0 -182
- package/pi.dev-src/pi-mono/coding-agent/test/agent-session-retry.test.ts +0 -318
- package/pi.dev-src/pi-mono/coding-agent/test/agent-session-runtime-events.test.ts +0 -208
- package/pi.dev-src/pi-mono/coding-agent/test/agent-session-stats.test.ts +0 -143
- package/pi.dev-src/pi-mono/coding-agent/test/agent-session-tree-navigation.test.ts +0 -323
- package/pi.dev-src/pi-mono/coding-agent/test/args.test.ts +0 -328
- package/pi.dev-src/pi-mono/coding-agent/test/assistant-message.test.ts +0 -57
- package/pi.dev-src/pi-mono/coding-agent/test/auth-storage.test.ts +0 -462
- package/pi.dev-src/pi-mono/coding-agent/test/bash-close-hang-windows.test.ts +0 -126
- package/pi.dev-src/pi-mono/coding-agent/test/bash-execution-width.test.ts +0 -80
- package/pi.dev-src/pi-mono/coding-agent/test/block-images.test.ts +0 -120
- package/pi.dev-src/pi-mono/coding-agent/test/clipboard-image-bmp-conversion.test.ts +0 -88
- package/pi.dev-src/pi-mono/coding-agent/test/clipboard-image.test.ts +0 -136
- package/pi.dev-src/pi-mono/coding-agent/test/compaction-extensions-example.test.ts +0 -66
- package/pi.dev-src/pi-mono/coding-agent/test/compaction-extensions.test.ts +0 -415
- package/pi.dev-src/pi-mono/coding-agent/test/compaction-serialization.test.ts +0 -79
- package/pi.dev-src/pi-mono/coding-agent/test/compaction-summary-reasoning.test.ts +0 -118
- package/pi.dev-src/pi-mono/coding-agent/test/compaction-thinking-model.test.ts +0 -223
- package/pi.dev-src/pi-mono/coding-agent/test/compaction.test.ts +0 -550
- package/pi.dev-src/pi-mono/coding-agent/test/config.test.ts +0 -30
- package/pi.dev-src/pi-mono/coding-agent/test/edit-tool-legacy-input.test.ts +0 -116
- package/pi.dev-src/pi-mono/coding-agent/test/edit-tool-no-full-redraw.test.ts +0 -235
- package/pi.dev-src/pi-mono/coding-agent/test/export-html-whitespace.test.ts +0 -12
- package/pi.dev-src/pi-mono/coding-agent/test/export-html-xss.test.ts +0 -28
- package/pi.dev-src/pi-mono/coding-agent/test/extensions-discovery.test.ts +0 -463
- package/pi.dev-src/pi-mono/coding-agent/test/extensions-input-event.test.ts +0 -112
- package/pi.dev-src/pi-mono/coding-agent/test/extensions-runner.test.ts +0 -805
- package/pi.dev-src/pi-mono/coding-agent/test/file-mutation-queue.test.ts +0 -163
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/assistant-message-with-thinking-code.json +0 -33
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/before-compaction.jsonl +0 -1003
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/empty-agent/.gitkeep +0 -0
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/empty-cwd/.gitkeep +0 -0
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/large-session.jsonl +0 -1019
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/consecutive-hyphens/SKILL.md +0 -8
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/disable-model-invocation/SKILL.md +0 -9
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/invalid-name-chars/SKILL.md +0 -8
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/invalid-yaml/SKILL.md +0 -8
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/long-name/SKILL.md +0 -8
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/missing-description/SKILL.md +0 -7
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/multiline-description/SKILL.md +0 -11
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/name-mismatch/SKILL.md +0 -8
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/nested/child-skill/SKILL.md +0 -8
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/no-frontmatter/SKILL.md +0 -3
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/root-skill-preferred/SKILL.md +0 -3
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/root-skill-preferred/nested-child/SKILL.md +0 -3
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/unknown-field/SKILL.md +0 -10
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills/valid-skill/SKILL.md +0 -8
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills-collision/first/calendar/SKILL.md +0 -8
- package/pi.dev-src/pi-mono/coding-agent/test/fixtures/skills-collision/second/calendar/SKILL.md +0 -8
- package/pi.dev-src/pi-mono/coding-agent/test/footer-data-provider.test.ts +0 -265
- package/pi.dev-src/pi-mono/coding-agent/test/footer-width.test.ts +0 -115
- package/pi.dev-src/pi-mono/coding-agent/test/frontmatter.test.ts +0 -60
- package/pi.dev-src/pi-mono/coding-agent/test/git-ssh-url.test.ts +0 -78
- package/pi.dev-src/pi-mono/coding-agent/test/git-update.test.ts +0 -411
- package/pi.dev-src/pi-mono/coding-agent/test/image-processing.test.ts +0 -145
- package/pi.dev-src/pi-mono/coding-agent/test/image-resize-callers.test.ts +0 -53
- package/pi.dev-src/pi-mono/coding-agent/test/initial-message.test.ts +0 -48
- package/pi.dev-src/pi-mono/coding-agent/test/interactive-mode-anthropic-warning.test.ts +0 -73
- package/pi.dev-src/pi-mono/coding-agent/test/interactive-mode-clone-command.test.ts +0 -77
- package/pi.dev-src/pi-mono/coding-agent/test/interactive-mode-compaction.test.ts +0 -57
- package/pi.dev-src/pi-mono/coding-agent/test/interactive-mode-import-command.test.ts +0 -144
- package/pi.dev-src/pi-mono/coding-agent/test/interactive-mode-status.test.ts +0 -635
- package/pi.dev-src/pi-mono/coding-agent/test/interactive-mode-suspend.test.ts +0 -149
- package/pi.dev-src/pi-mono/coding-agent/test/keybindings-migration.test.ts +0 -88
- package/pi.dev-src/pi-mono/coding-agent/test/model-registry.test.ts +0 -1209
- package/pi.dev-src/pi-mono/coding-agent/test/model-resolver.test.ts +0 -436
- package/pi.dev-src/pi-mono/coding-agent/test/package-command-paths.test.ts +0 -144
- package/pi.dev-src/pi-mono/coding-agent/test/package-manager-ssh.test.ts +0 -97
- package/pi.dev-src/pi-mono/coding-agent/test/package-manager.test.ts +0 -1795
- package/pi.dev-src/pi-mono/coding-agent/test/path-utils.test.ts +0 -162
- package/pi.dev-src/pi-mono/coding-agent/test/plan-mode-utils.test.ts +0 -261
- package/pi.dev-src/pi-mono/coding-agent/test/print-mode.test.ts +0 -140
- package/pi.dev-src/pi-mono/coding-agent/test/prompt-templates.test.ts +0 -515
- package/pi.dev-src/pi-mono/coding-agent/test/resource-loader.test.ts +0 -576
- package/pi.dev-src/pi-mono/coding-agent/test/rpc-client-clone.test.ts +0 -29
- package/pi.dev-src/pi-mono/coding-agent/test/rpc-example.ts +0 -86
- package/pi.dev-src/pi-mono/coding-agent/test/rpc-jsonl.test.ts +0 -65
- package/pi.dev-src/pi-mono/coding-agent/test/rpc-prompt-response-semantics.test.ts +0 -285
- package/pi.dev-src/pi-mono/coding-agent/test/rpc.test.ts +0 -321
- package/pi.dev-src/pi-mono/coding-agent/test/sdk-codex-cache-probe-tool-loop.ts +0 -364
- package/pi.dev-src/pi-mono/coding-agent/test/sdk-openrouter-attribution.test.ts +0 -181
- package/pi.dev-src/pi-mono/coding-agent/test/sdk-session-manager.test.ts +0 -95
- package/pi.dev-src/pi-mono/coding-agent/test/sdk-skills.test.ts +0 -109
- package/pi.dev-src/pi-mono/coding-agent/test/session-cwd.test.ts +0 -91
- package/pi.dev-src/pi-mono/coding-agent/test/session-info-modified-timestamp.test.ts +0 -83
- package/pi.dev-src/pi-mono/coding-agent/test/session-manager/build-context.test.ts +0 -268
- package/pi.dev-src/pi-mono/coding-agent/test/session-manager/custom-session-id.test.ts +0 -109
- package/pi.dev-src/pi-mono/coding-agent/test/session-manager/file-operations.test.ts +0 -208
- package/pi.dev-src/pi-mono/coding-agent/test/session-manager/labels.test.ts +0 -198
- package/pi.dev-src/pi-mono/coding-agent/test/session-manager/migration.test.ts +0 -78
- package/pi.dev-src/pi-mono/coding-agent/test/session-manager/save-entry.test.ts +0 -55
- package/pi.dev-src/pi-mono/coding-agent/test/session-manager/tree-traversal.test.ts +0 -533
- package/pi.dev-src/pi-mono/coding-agent/test/session-selector-path-delete.test.ts +0 -315
- package/pi.dev-src/pi-mono/coding-agent/test/session-selector-rename.test.ts +0 -111
- package/pi.dev-src/pi-mono/coding-agent/test/session-selector-search.test.ts +0 -195
- package/pi.dev-src/pi-mono/coding-agent/test/settings-manager-bug.test.ts +0 -147
- package/pi.dev-src/pi-mono/coding-agent/test/settings-manager.test.ts +0 -319
- package/pi.dev-src/pi-mono/coding-agent/test/skills.test.ts +0 -432
- package/pi.dev-src/pi-mono/coding-agent/test/stdout-cleanliness.test.ts +0 -103
- package/pi.dev-src/pi-mono/coding-agent/test/streaming-render-debug.ts +0 -97
- package/pi.dev-src/pi-mono/coding-agent/test/suite/agent-session-bash-persistence.test.ts +0 -242
- package/pi.dev-src/pi-mono/coding-agent/test/suite/agent-session-compaction.test.ts +0 -343
- package/pi.dev-src/pi-mono/coding-agent/test/suite/agent-session-model-extension.test.ts +0 -325
- package/pi.dev-src/pi-mono/coding-agent/test/suite/agent-session-prompt.test.ts +0 -323
- package/pi.dev-src/pi-mono/coding-agent/test/suite/agent-session-queue.test.ts +0 -422
- package/pi.dev-src/pi-mono/coding-agent/test/suite/agent-session-retry-events.test.ts +0 -358
- package/pi.dev-src/pi-mono/coding-agent/test/suite/agent-session-runtime.test.ts +0 -553
- package/pi.dev-src/pi-mono/coding-agent/test/suite/harness.ts +0 -208
- package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/2023-queued-slash-command-followup.test.ts +0 -80
- package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/2753-reload-stale-resource-settings.test.ts +0 -100
- package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/2781-skill-collision-precedence.test.ts +0 -120
- package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/2791-fswatch-error-crash.test.ts +0 -106
- package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/2835-tools-allowlist-filters-extension-tools.test.ts +0 -94
- package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/2860-replaced-session-context.test.ts +0 -274
- package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/3217-scoped-model-order.test.ts +0 -104
- package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/3302-find-path-glob.test.ts +0 -72
- package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/3303-find-nested-gitignore.test.ts +0 -83
- package/pi.dev-src/pi-mono/coding-agent/test/suite/regressions/3317-network-connection-lost-retry.test.ts +0 -33
- package/pi.dev-src/pi-mono/coding-agent/test/system-prompt.test.ts +0 -102
- package/pi.dev-src/pi-mono/coding-agent/test/test-harness.test.ts +0 -321
- package/pi.dev-src/pi-mono/coding-agent/test/test-harness.ts +0 -446
- package/pi.dev-src/pi-mono/coding-agent/test/test-theme-colors.ts +0 -246
- package/pi.dev-src/pi-mono/coding-agent/test/theme-export.test.ts +0 -104
- package/pi.dev-src/pi-mono/coding-agent/test/tool-execution-component.test.ts +0 -331
- package/pi.dev-src/pi-mono/coding-agent/test/tools.test.ts +0 -889
- package/pi.dev-src/pi-mono/coding-agent/test/tree-selector.test.ts +0 -655
- package/pi.dev-src/pi-mono/coding-agent/test/trigger-compact-extension.test.ts +0 -57
- package/pi.dev-src/pi-mono/coding-agent/test/truncate-to-width.test.ts +0 -81
- package/pi.dev-src/pi-mono/coding-agent/test/user-message.test.ts +0 -25
- package/pi.dev-src/pi-mono/coding-agent/test/utilities.ts +0 -316
- package/pi.dev-src/pi-mono/coding-agent/tsconfig.examples.json +0 -16
- package/pi.dev-src/pi-mono/coding-agent/vitest.config.ts +0 -26
- package/pi.dev-src/pi-mono/mom/dev.sh +0 -30
- package/pi.dev-src/pi-mono/mom/docker.sh +0 -95
- package/pi.dev-src/pi-mono/mom/scripts/migrate-timestamps.ts +0 -121
- package/pi.dev-src/pi-mono/mom/src/agent.ts +0 -882
- package/pi.dev-src/pi-mono/mom/src/context.ts +0 -180
- package/pi.dev-src/pi-mono/mom/src/download.ts +0 -117
- package/pi.dev-src/pi-mono/mom/src/events.ts +0 -442
- package/pi.dev-src/pi-mono/mom/src/fs-watch.ts +0 -30
- package/pi.dev-src/pi-mono/mom/src/log.ts +0 -271
- package/pi.dev-src/pi-mono/mom/src/main.ts +0 -367
- package/pi.dev-src/pi-mono/mom/src/sandbox.ts +0 -221
- package/pi.dev-src/pi-mono/mom/src/slack.ts +0 -623
- package/pi.dev-src/pi-mono/mom/src/store.ts +0 -234
- package/pi.dev-src/pi-mono/mom/src/tools/attach.ts +0 -47
- package/pi.dev-src/pi-mono/mom/src/tools/bash.ts +0 -97
- package/pi.dev-src/pi-mono/mom/src/tools/edit.ts +0 -165
- package/pi.dev-src/pi-mono/mom/src/tools/index.ts +0 -19
- package/pi.dev-src/pi-mono/mom/src/tools/read.ts +0 -159
- package/pi.dev-src/pi-mono/mom/src/tools/truncate.ts +0 -236
- package/pi.dev-src/pi-mono/mom/src/tools/write.ts +0 -45
- package/pi.dev-src/pi-mono/mom/test/events.test.ts +0 -50
- package/pi.dev-src/pi-mono/pods/scripts/model_run.sh +0 -83
- package/pi.dev-src/pi-mono/pods/scripts/pod_setup.sh +0 -336
- package/pi.dev-src/pi-mono/pods/src/cli.ts +0 -360
- package/pi.dev-src/pi-mono/pods/src/commands/models.ts +0 -753
- package/pi.dev-src/pi-mono/pods/src/commands/pods.ts +0 -205
- package/pi.dev-src/pi-mono/pods/src/commands/prompt.ts +0 -84
- package/pi.dev-src/pi-mono/pods/src/config.ts +0 -80
- package/pi.dev-src/pi-mono/pods/src/index.ts +0 -2
- package/pi.dev-src/pi-mono/pods/src/model-configs.ts +0 -111
- package/pi.dev-src/pi-mono/pods/src/models.json +0 -295
- package/pi.dev-src/pi-mono/pods/src/ssh.ts +0 -151
- package/pi.dev-src/pi-mono/pods/src/types.ts +0 -27
- package/pi.dev-src/pi-mono/tui/src/autocomplete.ts +0 -783
- package/pi.dev-src/pi-mono/tui/src/components/box.ts +0 -137
- package/pi.dev-src/pi-mono/tui/src/components/cancellable-loader.ts +0 -40
- package/pi.dev-src/pi-mono/tui/src/components/editor.ts +0 -2280
- package/pi.dev-src/pi-mono/tui/src/components/image.ts +0 -104
- package/pi.dev-src/pi-mono/tui/src/components/input.ts +0 -503
- package/pi.dev-src/pi-mono/tui/src/components/loader.ts +0 -86
- package/pi.dev-src/pi-mono/tui/src/components/markdown.ts +0 -852
- package/pi.dev-src/pi-mono/tui/src/components/select-list.ts +0 -229
- package/pi.dev-src/pi-mono/tui/src/components/settings-list.ts +0 -250
- package/pi.dev-src/pi-mono/tui/src/components/spacer.ts +0 -28
- package/pi.dev-src/pi-mono/tui/src/components/text.ts +0 -106
- package/pi.dev-src/pi-mono/tui/src/components/truncated-text.ts +0 -65
- package/pi.dev-src/pi-mono/tui/src/editor-component.ts +0 -74
- package/pi.dev-src/pi-mono/tui/src/fuzzy.ts +0 -133
- package/pi.dev-src/pi-mono/tui/src/index.ts +0 -106
- package/pi.dev-src/pi-mono/tui/src/keybindings.ts +0 -244
- package/pi.dev-src/pi-mono/tui/src/keys.ts +0 -1400
- package/pi.dev-src/pi-mono/tui/src/kill-ring.ts +0 -46
- package/pi.dev-src/pi-mono/tui/src/stdin-buffer.ts +0 -386
- package/pi.dev-src/pi-mono/tui/src/terminal-image.ts +0 -414
- package/pi.dev-src/pi-mono/tui/src/terminal.ts +0 -373
- package/pi.dev-src/pi-mono/tui/src/tui.ts +0 -1243
- package/pi.dev-src/pi-mono/tui/src/undo-stack.ts +0 -28
- package/pi.dev-src/pi-mono/tui/src/utils.ts +0 -1085
- package/pi.dev-src/pi-mono/tui/test/autocomplete.test.ts +0 -542
- package/pi.dev-src/pi-mono/tui/test/bug-regression-isimageline-startswith-bug.test.ts +0 -237
- package/pi.dev-src/pi-mono/tui/test/chat-simple.ts +0 -129
- package/pi.dev-src/pi-mono/tui/test/editor.test.ts +0 -3812
- package/pi.dev-src/pi-mono/tui/test/fuzzy.test.ts +0 -98
- package/pi.dev-src/pi-mono/tui/test/image-test.ts +0 -56
- package/pi.dev-src/pi-mono/tui/test/input.test.ts +0 -580
- package/pi.dev-src/pi-mono/tui/test/key-tester.ts +0 -105
- package/pi.dev-src/pi-mono/tui/test/keybindings.test.ts +0 -38
- package/pi.dev-src/pi-mono/tui/test/keys.test.ts +0 -614
- package/pi.dev-src/pi-mono/tui/test/markdown.test.ts +0 -1236
- package/pi.dev-src/pi-mono/tui/test/overlay-non-capturing.test.ts +0 -609
- package/pi.dev-src/pi-mono/tui/test/overlay-options.test.ts +0 -538
- package/pi.dev-src/pi-mono/tui/test/overlay-short-content.test.ts +0 -56
- package/pi.dev-src/pi-mono/tui/test/regression-regional-indicator-width.test.ts +0 -52
- package/pi.dev-src/pi-mono/tui/test/select-list.test.ts +0 -116
- package/pi.dev-src/pi-mono/tui/test/stdin-buffer.test.ts +0 -422
- package/pi.dev-src/pi-mono/tui/test/terminal-image.test.ts +0 -279
- package/pi.dev-src/pi-mono/tui/test/test-themes.ts +0 -38
- package/pi.dev-src/pi-mono/tui/test/truncate-to-width.test.ts +0 -62
- package/pi.dev-src/pi-mono/tui/test/truncated-text.test.ts +0 -129
- package/pi.dev-src/pi-mono/tui/test/tui-cell-size-input.test.ts +0 -81
- package/pi.dev-src/pi-mono/tui/test/tui-overlay-style-leak.test.ts +0 -72
- package/pi.dev-src/pi-mono/tui/test/tui-render.test.ts +0 -509
- package/pi.dev-src/pi-mono/tui/test/viewport-overwrite-repro.ts +0 -106
- package/pi.dev-src/pi-mono/tui/test/virtual-terminal.ts +0 -218
- package/pi.dev-src/pi-mono/tui/test/wrap-ansi.test.ts +0 -207
- package/pi.dev-src/pi-mono/tui/vitest.config.ts +0 -7
- package/pi.dev-src/pi-mono/web-ui/example/index.html +0 -13
- package/pi.dev-src/pi-mono/web-ui/example/src/app.css +0 -1
- package/pi.dev-src/pi-mono/web-ui/example/src/custom-messages.ts +0 -99
- package/pi.dev-src/pi-mono/web-ui/example/src/main.ts +0 -421
- package/pi.dev-src/pi-mono/web-ui/example/tsconfig.json +0 -23
- package/pi.dev-src/pi-mono/web-ui/example/vite.config.ts +0 -6
- package/pi.dev-src/pi-mono/web-ui/scripts/count-prompt-tokens.ts +0 -88
- package/pi.dev-src/pi-mono/web-ui/src/ChatPanel.ts +0 -209
- package/pi.dev-src/pi-mono/web-ui/src/app.css +0 -68
- package/pi.dev-src/pi-mono/web-ui/src/components/AgentInterface.ts +0 -403
- package/pi.dev-src/pi-mono/web-ui/src/components/AttachmentTile.ts +0 -107
- package/pi.dev-src/pi-mono/web-ui/src/components/ConsoleBlock.ts +0 -72
- package/pi.dev-src/pi-mono/web-ui/src/components/CustomProviderCard.ts +0 -100
- package/pi.dev-src/pi-mono/web-ui/src/components/ExpandableSection.ts +0 -46
- package/pi.dev-src/pi-mono/web-ui/src/components/Input.ts +0 -113
- package/pi.dev-src/pi-mono/web-ui/src/components/MessageEditor.ts +0 -405
- package/pi.dev-src/pi-mono/web-ui/src/components/MessageList.ts +0 -98
- package/pi.dev-src/pi-mono/web-ui/src/components/Messages.ts +0 -383
- package/pi.dev-src/pi-mono/web-ui/src/components/ProviderKeyInput.ts +0 -153
- package/pi.dev-src/pi-mono/web-ui/src/components/SandboxedIframe.ts +0 -626
- package/pi.dev-src/pi-mono/web-ui/src/components/StreamingMessageContainer.ts +0 -103
- package/pi.dev-src/pi-mono/web-ui/src/components/ThinkingBlock.ts +0 -43
- package/pi.dev-src/pi-mono/web-ui/src/components/message-renderer-registry.ts +0 -28
- package/pi.dev-src/pi-mono/web-ui/src/components/sandbox/ArtifactsRuntimeProvider.ts +0 -220
- package/pi.dev-src/pi-mono/web-ui/src/components/sandbox/AttachmentsRuntimeProvider.ts +0 -66
- package/pi.dev-src/pi-mono/web-ui/src/components/sandbox/ConsoleRuntimeProvider.ts +0 -186
- package/pi.dev-src/pi-mono/web-ui/src/components/sandbox/FileDownloadRuntimeProvider.ts +0 -110
- package/pi.dev-src/pi-mono/web-ui/src/components/sandbox/RuntimeMessageBridge.ts +0 -82
- package/pi.dev-src/pi-mono/web-ui/src/components/sandbox/RuntimeMessageRouter.ts +0 -216
- package/pi.dev-src/pi-mono/web-ui/src/components/sandbox/SandboxRuntimeProvider.ts +0 -52
- package/pi.dev-src/pi-mono/web-ui/src/dialogs/ApiKeyPromptDialog.ts +0 -75
- package/pi.dev-src/pi-mono/web-ui/src/dialogs/AttachmentOverlay.ts +0 -636
- package/pi.dev-src/pi-mono/web-ui/src/dialogs/CustomProviderDialog.ts +0 -274
- package/pi.dev-src/pi-mono/web-ui/src/dialogs/ModelSelector.ts +0 -370
- package/pi.dev-src/pi-mono/web-ui/src/dialogs/PersistentStorageDialog.ts +0 -144
- package/pi.dev-src/pi-mono/web-ui/src/dialogs/ProvidersModelsTab.ts +0 -212
- package/pi.dev-src/pi-mono/web-ui/src/dialogs/SessionListDialog.ts +0 -150
- package/pi.dev-src/pi-mono/web-ui/src/dialogs/SettingsDialog.ts +0 -218
- package/pi.dev-src/pi-mono/web-ui/src/index.ts +0 -120
- package/pi.dev-src/pi-mono/web-ui/src/prompts/prompts.ts +0 -282
- package/pi.dev-src/pi-mono/web-ui/src/storage/app-storage.ts +0 -60
- package/pi.dev-src/pi-mono/web-ui/src/storage/backends/indexeddb-storage-backend.ts +0 -193
- package/pi.dev-src/pi-mono/web-ui/src/storage/store.ts +0 -33
- package/pi.dev-src/pi-mono/web-ui/src/storage/stores/custom-providers-store.ts +0 -62
- package/pi.dev-src/pi-mono/web-ui/src/storage/stores/provider-keys-store.ts +0 -33
- package/pi.dev-src/pi-mono/web-ui/src/storage/stores/sessions-store.ts +0 -136
- package/pi.dev-src/pi-mono/web-ui/src/storage/stores/settings-store.ts +0 -34
- package/pi.dev-src/pi-mono/web-ui/src/storage/types.ts +0 -206
- package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/ArtifactElement.ts +0 -14
- package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/ArtifactPill.ts +0 -26
- package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/Console.ts +0 -93
- package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/DocxArtifact.ts +0 -213
- package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/ExcelArtifact.ts +0 -231
- package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/GenericArtifact.ts +0 -117
- package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/HtmlArtifact.ts +0 -195
- package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/ImageArtifact.ts +0 -116
- package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/MarkdownArtifact.ts +0 -82
- package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/PdfArtifact.ts +0 -201
- package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/SvgArtifact.ts +0 -119
- package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/TextArtifact.ts +0 -148
- package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/artifacts-tool-renderer.ts +0 -310
- package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/artifacts.ts +0 -713
- package/pi.dev-src/pi-mono/web-ui/src/tools/artifacts/index.ts +0 -7
- package/pi.dev-src/pi-mono/web-ui/src/tools/extract-document.ts +0 -275
- package/pi.dev-src/pi-mono/web-ui/src/tools/index.ts +0 -46
- package/pi.dev-src/pi-mono/web-ui/src/tools/javascript-repl.ts +0 -293
- package/pi.dev-src/pi-mono/web-ui/src/tools/renderer-registry.ts +0 -130
- package/pi.dev-src/pi-mono/web-ui/src/tools/renderers/BashRenderer.ts +0 -52
- package/pi.dev-src/pi-mono/web-ui/src/tools/renderers/CalculateRenderer.ts +0 -58
- package/pi.dev-src/pi-mono/web-ui/src/tools/renderers/DefaultRenderer.ts +0 -103
- package/pi.dev-src/pi-mono/web-ui/src/tools/renderers/GetCurrentTimeRenderer.ts +0 -92
- package/pi.dev-src/pi-mono/web-ui/src/tools/types.ts +0 -15
- package/pi.dev-src/pi-mono/web-ui/src/utils/attachment-utils.ts +0 -472
- package/pi.dev-src/pi-mono/web-ui/src/utils/auth-token.ts +0 -22
- package/pi.dev-src/pi-mono/web-ui/src/utils/format.ts +0 -42
- package/pi.dev-src/pi-mono/web-ui/src/utils/i18n.ts +0 -653
- package/pi.dev-src/pi-mono/web-ui/src/utils/model-discovery.ts +0 -277
- package/pi.dev-src/pi-mono/web-ui/src/utils/proxy-utils.ts +0 -139
- package/pi.dev-src/pi-mono/web-ui/src/utils/test-sessions.ts +0 -2357
- package/pi.dev-src/pi-mono/web-ui/tsconfig.json +0 -7
- package/tests/attended-results-scenarios.ts +0 -648
- package/tests/attended-results.test.ts +0 -39
- package/tests/cli-command-option-parity.test.ts +0 -798
- package/tests/debug-extension-harness.test.ts +0 -466
- package/tests/extension-registration.test.ts +0 -6785
- package/tests/fixtures/fixture_c.c +0 -361
- package/tests/fixtures/fixture_cpp.cpp +0 -407
- package/tests/fixtures/fixture_csharp.cs +0 -411
- package/tests/fixtures/fixture_elixir.ex +0 -409
- package/tests/fixtures/fixture_go.go +0 -341
- package/tests/fixtures/fixture_haskell.hs +0 -250
- package/tests/fixtures/fixture_java.java +0 -430
- package/tests/fixtures/fixture_javascript.js +0 -383
- package/tests/fixtures/fixture_kotlin.kt +0 -451
- package/tests/fixtures/fixture_lua.lua +0 -276
- package/tests/fixtures/fixture_perl.pl +0 -310
- package/tests/fixtures/fixture_php.php +0 -433
- package/tests/fixtures/fixture_python.py +0 -502
- package/tests/fixtures/fixture_ruby.rb +0 -345
- package/tests/fixtures/fixture_rust.rs +0 -380
- package/tests/fixtures/fixture_scala.scala +0 -398
- package/tests/fixtures/fixture_shell.sh +0 -276
- package/tests/fixtures/fixture_swift.swift +0 -397
- package/tests/fixtures/fixture_typescript.ts +0 -434
- package/tests/fixtures/fixture_zig.zig +0 -295
- package/tests/fixtures_attended_results/project/compress-line-numbers.json +0 -5
- package/tests/fixtures_attended_results/project/compress.json +0 -5
- package/tests/fixtures_attended_results/project/enable-static-check-invalid-command.json +0 -5
- package/tests/fixtures_attended_results/project/enable-static-check-valid.json +0 -5
- package/tests/fixtures_attended_results/project/files-static-check.json +0 -5
- package/tests/fixtures_attended_results/project/find-line-numbers.json +0 -5
- package/tests/fixtures_attended_results/project/find.json +0 -5
- package/tests/fixtures_attended_results/project/get-base-path.json +0 -5
- package/tests/fixtures_attended_results/project/git-check-clean.json +0 -5
- package/tests/fixtures_attended_results/project/git-check-dirty.json +0 -5
- package/tests/fixtures_attended_results/project/git-path.json +0 -5
- package/tests/fixtures_attended_results/project/git-wt-create-invalid.json +0 -5
- package/tests/fixtures_attended_results/project/git-wt-create-valid.json +0 -5
- package/tests/fixtures_attended_results/project/git-wt-delete-nonexistent.json +0 -5
- package/tests/fixtures_attended_results/project/git-wt-delete-valid.json +0 -5
- package/tests/fixtures_attended_results/project/git-wt-name.json +0 -5
- package/tests/fixtures_attended_results/project/static-check.json +0 -5
- package/tests/fixtures_attended_results/project/summarize.json +0 -5
- package/tests/fixtures_attended_results/project/tokens.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_c.c.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_cpp.cpp.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_csharp.cs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_elixir.ex.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_go.go.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_haskell.hs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_java.java.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_javascript.js.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_kotlin.kt.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_lua.lua.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_perl.pl.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_php.php.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_python.py.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_ruby.rb.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_rust.rs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_scala.scala.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_shell.sh.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_swift.swift.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_typescript.ts.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_zig.zig.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_c.c.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_cpp.cpp.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_csharp.cs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_elixir.ex.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_go.go.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_haskell.hs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_java.java.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_javascript.js.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_kotlin.kt.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_lua.lua.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_perl.pl.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_php.php.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_python.py.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_ruby.rb.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_rust.rs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_scala.scala.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_shell.sh.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_swift.swift.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_typescript.ts.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_zig.zig.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_c.c.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_cpp.cpp.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_csharp.cs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_elixir.ex.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_go.go.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_haskell.hs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_java.java.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_javascript.js.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_kotlin.kt.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_lua.lua.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_perl.pl.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_php.php.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_python.py.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_ruby.rb.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_rust.rs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_scala.scala.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_shell.sh.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_swift.swift.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_typescript.ts.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find/fixture_zig.zig.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_c.c.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_cpp.cpp.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_csharp.cs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_elixir.ex.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_go.go.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_haskell.hs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_java.java.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_javascript.js.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_kotlin.kt.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_lua.lua.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_perl.pl.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_php.php.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_python.py.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_ruby.rb.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_rust.rs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_scala.scala.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_shell.sh.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_swift.swift.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_typescript.ts.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_zig.zig.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_c.c.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_cpp.cpp.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_csharp.cs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_elixir.ex.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_go.go.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_haskell.hs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_java.java.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_javascript.js.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_kotlin.kt.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_lua.lua.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_perl.pl.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_php.php.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_python.py.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_ruby.rb.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_rust.rs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_scala.scala.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_shell.sh.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_swift.swift.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_typescript.ts.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-summarize/fixture_zig.zig.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_c.c.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_cpp.cpp.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_csharp.cs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_elixir.ex.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_go.go.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_haskell.hs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_java.java.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_javascript.js.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_kotlin.kt.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_lua.lua.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_perl.pl.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_php.php.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_python.py.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_ruby.rb.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_rust.rs.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_scala.scala.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_shell.sh.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_swift.swift.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_typescript.ts.json +0 -5
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_zig.zig.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_c.c.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_cpp.cpp.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_csharp.cs.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_elixir.ex.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_go.go.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_haskell.hs.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_java.java.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_javascript.js.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_kotlin.kt.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_lua.lua.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_perl.pl.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_php.php.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_python.py.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_ruby.rb.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_rust.rs.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_scala.scala.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_shell.sh.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_swift.swift.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_typescript.ts.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_zig.zig.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_c.c.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_cpp.cpp.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_csharp.cs.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_elixir.ex.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_go.go.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_haskell.hs.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_java.java.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_javascript.js.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_kotlin.kt.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_lua.lua.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_perl.pl.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_php.php.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_python.py.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_ruby.rb.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_rust.rs.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_scala.scala.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_shell.sh.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_swift.swift.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_typescript.ts.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_zig.zig.json +0 -5
- package/tests/helpers.ts +0 -236
- package/tests/oracle-project.test.ts +0 -67
- package/tests/oracle-standalone.test.ts +0 -68
- package/tests/prompt-command-summary.test.ts +0 -36
- package/tests/prompt-rendering.test.ts +0 -103
- package/tests/python_oracle_stubs/tiktoken.py +0 -76
- package/tests/release-workflow.test.ts +0 -195
- package/tests/static-check-bundled.test.ts +0 -332
|
@@ -1,1635 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env tsx
|
|
2
|
-
|
|
3
|
-
import { writeFileSync } from "fs";
|
|
4
|
-
import { join, dirname } from "path";
|
|
5
|
-
import { fileURLToPath } from "url";
|
|
6
|
-
import { Api, KnownProvider, Model, type OpenAICompletionsCompat } from "../src/types.js";
|
|
7
|
-
|
|
8
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
-
const __dirname = dirname(__filename);
|
|
10
|
-
const packageRoot = join(__dirname, "..");
|
|
11
|
-
|
|
12
|
-
interface ModelsDevModel {
|
|
13
|
-
id: string;
|
|
14
|
-
name: string;
|
|
15
|
-
tool_call?: boolean;
|
|
16
|
-
reasoning?: boolean;
|
|
17
|
-
limit?: {
|
|
18
|
-
context?: number;
|
|
19
|
-
output?: number;
|
|
20
|
-
};
|
|
21
|
-
cost?: {
|
|
22
|
-
input?: number;
|
|
23
|
-
output?: number;
|
|
24
|
-
cache_read?: number;
|
|
25
|
-
cache_write?: number;
|
|
26
|
-
};
|
|
27
|
-
modalities?: {
|
|
28
|
-
input?: string[];
|
|
29
|
-
};
|
|
30
|
-
provider?: {
|
|
31
|
-
npm?: string;
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface AiGatewayModel {
|
|
36
|
-
id: string;
|
|
37
|
-
name?: string;
|
|
38
|
-
context_window?: number;
|
|
39
|
-
max_tokens?: number;
|
|
40
|
-
tags?: string[];
|
|
41
|
-
pricing?: {
|
|
42
|
-
input?: string | number;
|
|
43
|
-
output?: string | number;
|
|
44
|
-
input_cache_read?: string | number;
|
|
45
|
-
input_cache_write?: string | number;
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const COPILOT_STATIC_HEADERS = {
|
|
50
|
-
"User-Agent": "GitHubCopilotChat/0.35.0",
|
|
51
|
-
"Editor-Version": "vscode/1.107.0",
|
|
52
|
-
"Editor-Plugin-Version": "copilot-chat/0.35.0",
|
|
53
|
-
"Copilot-Integration-Id": "vscode-chat",
|
|
54
|
-
} as const;
|
|
55
|
-
|
|
56
|
-
const AI_GATEWAY_MODELS_URL = "https://ai-gateway.vercel.sh/v1";
|
|
57
|
-
const AI_GATEWAY_BASE_URL = "https://ai-gateway.vercel.sh";
|
|
58
|
-
const ZAI_TOOL_STREAM_UNSUPPORTED_MODELS = new Set(["glm-4.5", "glm-4.5-air", "glm-4.5-flash", "glm-4.5v"]);
|
|
59
|
-
|
|
60
|
-
function getBedrockBaseUrl(modelId: string): string {
|
|
61
|
-
return modelId.startsWith("eu.")
|
|
62
|
-
? "https://bedrock-runtime.eu-central-1.amazonaws.com"
|
|
63
|
-
: "https://bedrock-runtime.us-east-1.amazonaws.com";
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
async function fetchOpenRouterModels(): Promise<Model<any>[]> {
|
|
67
|
-
try {
|
|
68
|
-
console.log("Fetching models from OpenRouter API...");
|
|
69
|
-
const response = await fetch("https://openrouter.ai/api/v1/models");
|
|
70
|
-
const data = await response.json();
|
|
71
|
-
|
|
72
|
-
const models: Model<any>[] = [];
|
|
73
|
-
|
|
74
|
-
for (const model of data.data) {
|
|
75
|
-
// Only include models that support tools
|
|
76
|
-
if (!model.supported_parameters?.includes("tools")) continue;
|
|
77
|
-
|
|
78
|
-
// Parse provider from model ID
|
|
79
|
-
let provider: KnownProvider = "openrouter";
|
|
80
|
-
let modelKey = model.id;
|
|
81
|
-
|
|
82
|
-
modelKey = model.id; // Keep full ID for OpenRouter
|
|
83
|
-
|
|
84
|
-
// Parse input modalities
|
|
85
|
-
const input: ("text" | "image")[] = ["text"];
|
|
86
|
-
if (model.architecture?.modality?.includes("image")) {
|
|
87
|
-
input.push("image");
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// Convert pricing from $/token to $/million tokens
|
|
91
|
-
const inputCost = parseFloat(model.pricing?.prompt || "0") * 1_000_000;
|
|
92
|
-
const outputCost = parseFloat(model.pricing?.completion || "0") * 1_000_000;
|
|
93
|
-
const cacheReadCost = parseFloat(model.pricing?.input_cache_read || "0") * 1_000_000;
|
|
94
|
-
const cacheWriteCost = parseFloat(model.pricing?.input_cache_write || "0") * 1_000_000;
|
|
95
|
-
|
|
96
|
-
const normalizedModel: Model<any> = {
|
|
97
|
-
id: modelKey,
|
|
98
|
-
name: model.name,
|
|
99
|
-
api: "openai-completions",
|
|
100
|
-
baseUrl: "https://openrouter.ai/api/v1",
|
|
101
|
-
provider,
|
|
102
|
-
reasoning: model.supported_parameters?.includes("reasoning") || false,
|
|
103
|
-
input,
|
|
104
|
-
cost: {
|
|
105
|
-
input: inputCost,
|
|
106
|
-
output: outputCost,
|
|
107
|
-
cacheRead: cacheReadCost,
|
|
108
|
-
cacheWrite: cacheWriteCost,
|
|
109
|
-
},
|
|
110
|
-
contextWindow: model.context_length || 4096,
|
|
111
|
-
maxTokens: model.top_provider?.max_completion_tokens || 4096,
|
|
112
|
-
};
|
|
113
|
-
models.push(normalizedModel);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
console.log(`Fetched ${models.length} tool-capable models from OpenRouter`);
|
|
117
|
-
return models;
|
|
118
|
-
} catch (error) {
|
|
119
|
-
console.error("Failed to fetch OpenRouter models:", error);
|
|
120
|
-
return [];
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
async function fetchAiGatewayModels(): Promise<Model<any>[]> {
|
|
125
|
-
try {
|
|
126
|
-
console.log("Fetching models from Vercel AI Gateway API...");
|
|
127
|
-
const response = await fetch(`${AI_GATEWAY_MODELS_URL}/models`);
|
|
128
|
-
const data = await response.json();
|
|
129
|
-
const models: Model<any>[] = [];
|
|
130
|
-
|
|
131
|
-
const toNumber = (value: string | number | undefined): number => {
|
|
132
|
-
if (typeof value === "number") {
|
|
133
|
-
return Number.isFinite(value) ? value : 0;
|
|
134
|
-
}
|
|
135
|
-
const parsed = parseFloat(value ?? "0");
|
|
136
|
-
return Number.isFinite(parsed) ? parsed : 0;
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
const items = Array.isArray(data.data) ? (data.data as AiGatewayModel[]) : [];
|
|
140
|
-
for (const model of items) {
|
|
141
|
-
const tags = Array.isArray(model.tags) ? model.tags : [];
|
|
142
|
-
// Only include models that support tools
|
|
143
|
-
if (!tags.includes("tool-use")) continue;
|
|
144
|
-
|
|
145
|
-
const input: ("text" | "image")[] = ["text"];
|
|
146
|
-
if (tags.includes("vision")) {
|
|
147
|
-
input.push("image");
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
const inputCost = toNumber(model.pricing?.input) * 1_000_000;
|
|
151
|
-
const outputCost = toNumber(model.pricing?.output) * 1_000_000;
|
|
152
|
-
const cacheReadCost = toNumber(model.pricing?.input_cache_read) * 1_000_000;
|
|
153
|
-
const cacheWriteCost = toNumber(model.pricing?.input_cache_write) * 1_000_000;
|
|
154
|
-
|
|
155
|
-
models.push({
|
|
156
|
-
id: model.id,
|
|
157
|
-
name: model.name || model.id,
|
|
158
|
-
api: "anthropic-messages",
|
|
159
|
-
baseUrl: AI_GATEWAY_BASE_URL,
|
|
160
|
-
provider: "vercel-ai-gateway",
|
|
161
|
-
reasoning: tags.includes("reasoning"),
|
|
162
|
-
input,
|
|
163
|
-
cost: {
|
|
164
|
-
input: inputCost,
|
|
165
|
-
output: outputCost,
|
|
166
|
-
cacheRead: cacheReadCost,
|
|
167
|
-
cacheWrite: cacheWriteCost,
|
|
168
|
-
},
|
|
169
|
-
contextWindow: model.context_window || 4096,
|
|
170
|
-
maxTokens: model.max_tokens || 4096,
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
console.log(`Fetched ${models.length} tool-capable models from Vercel AI Gateway`);
|
|
175
|
-
return models;
|
|
176
|
-
} catch (error) {
|
|
177
|
-
console.error("Failed to fetch Vercel AI Gateway models:", error);
|
|
178
|
-
return [];
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
async function loadModelsDevData(): Promise<Model<any>[]> {
|
|
183
|
-
try {
|
|
184
|
-
console.log("Fetching models from models.dev API...");
|
|
185
|
-
const response = await fetch("https://models.dev/api.json");
|
|
186
|
-
const data = await response.json();
|
|
187
|
-
|
|
188
|
-
const models: Model<any>[] = [];
|
|
189
|
-
|
|
190
|
-
// Process Amazon Bedrock models
|
|
191
|
-
if (data["amazon-bedrock"]?.models) {
|
|
192
|
-
for (const [modelId, model] of Object.entries(data["amazon-bedrock"].models)) {
|
|
193
|
-
const m = model as ModelsDevModel;
|
|
194
|
-
if (m.tool_call !== true) continue;
|
|
195
|
-
|
|
196
|
-
let id = modelId;
|
|
197
|
-
|
|
198
|
-
if (id.startsWith("ai21.jamba")) {
|
|
199
|
-
// These models doesn't support tool use in streaming mode
|
|
200
|
-
continue;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
if (id.startsWith("mistral.mistral-7b-instruct-v0")) {
|
|
204
|
-
// These models doesn't support system messages
|
|
205
|
-
continue;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
models.push({
|
|
209
|
-
id,
|
|
210
|
-
name: m.name || id,
|
|
211
|
-
api: "bedrock-converse-stream" as const,
|
|
212
|
-
provider: "amazon-bedrock" as const,
|
|
213
|
-
baseUrl: getBedrockBaseUrl(id),
|
|
214
|
-
reasoning: m.reasoning === true,
|
|
215
|
-
input: (m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"]) as ("text" | "image")[],
|
|
216
|
-
cost: {
|
|
217
|
-
input: m.cost?.input || 0,
|
|
218
|
-
output: m.cost?.output || 0,
|
|
219
|
-
cacheRead: m.cost?.cache_read || 0,
|
|
220
|
-
cacheWrite: m.cost?.cache_write || 0,
|
|
221
|
-
},
|
|
222
|
-
contextWindow: m.limit?.context || 4096,
|
|
223
|
-
maxTokens: m.limit?.output || 4096,
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// Process Anthropic models
|
|
229
|
-
if (data.anthropic?.models) {
|
|
230
|
-
for (const [modelId, model] of Object.entries(data.anthropic.models)) {
|
|
231
|
-
const m = model as ModelsDevModel;
|
|
232
|
-
if (m.tool_call !== true) continue;
|
|
233
|
-
|
|
234
|
-
models.push({
|
|
235
|
-
id: modelId,
|
|
236
|
-
name: m.name || modelId,
|
|
237
|
-
api: "anthropic-messages",
|
|
238
|
-
provider: "anthropic",
|
|
239
|
-
baseUrl: "https://api.anthropic.com",
|
|
240
|
-
reasoning: m.reasoning === true,
|
|
241
|
-
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
|
242
|
-
cost: {
|
|
243
|
-
input: m.cost?.input || 0,
|
|
244
|
-
output: m.cost?.output || 0,
|
|
245
|
-
cacheRead: m.cost?.cache_read || 0,
|
|
246
|
-
cacheWrite: m.cost?.cache_write || 0,
|
|
247
|
-
},
|
|
248
|
-
contextWindow: m.limit?.context || 4096,
|
|
249
|
-
maxTokens: m.limit?.output || 4096,
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
// Process Google models
|
|
255
|
-
if (data.google?.models) {
|
|
256
|
-
for (const [modelId, model] of Object.entries(data.google.models)) {
|
|
257
|
-
const m = model as ModelsDevModel;
|
|
258
|
-
if (m.tool_call !== true) continue;
|
|
259
|
-
|
|
260
|
-
models.push({
|
|
261
|
-
id: modelId,
|
|
262
|
-
name: m.name || modelId,
|
|
263
|
-
api: "google-generative-ai",
|
|
264
|
-
provider: "google",
|
|
265
|
-
baseUrl: "https://generativelanguage.googleapis.com/v1beta",
|
|
266
|
-
reasoning: m.reasoning === true,
|
|
267
|
-
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
|
268
|
-
cost: {
|
|
269
|
-
input: m.cost?.input || 0,
|
|
270
|
-
output: m.cost?.output || 0,
|
|
271
|
-
cacheRead: m.cost?.cache_read || 0,
|
|
272
|
-
cacheWrite: m.cost?.cache_write || 0,
|
|
273
|
-
},
|
|
274
|
-
contextWindow: m.limit?.context || 4096,
|
|
275
|
-
maxTokens: m.limit?.output || 4096,
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
// Process OpenAI models
|
|
281
|
-
if (data.openai?.models) {
|
|
282
|
-
for (const [modelId, model] of Object.entries(data.openai.models)) {
|
|
283
|
-
const m = model as ModelsDevModel;
|
|
284
|
-
if (m.tool_call !== true) continue;
|
|
285
|
-
|
|
286
|
-
models.push({
|
|
287
|
-
id: modelId,
|
|
288
|
-
name: m.name || modelId,
|
|
289
|
-
api: "openai-responses",
|
|
290
|
-
provider: "openai",
|
|
291
|
-
baseUrl: "https://api.openai.com/v1",
|
|
292
|
-
reasoning: m.reasoning === true,
|
|
293
|
-
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
|
294
|
-
cost: {
|
|
295
|
-
input: m.cost?.input || 0,
|
|
296
|
-
output: m.cost?.output || 0,
|
|
297
|
-
cacheRead: m.cost?.cache_read || 0,
|
|
298
|
-
cacheWrite: m.cost?.cache_write || 0,
|
|
299
|
-
},
|
|
300
|
-
contextWindow: m.limit?.context || 4096,
|
|
301
|
-
maxTokens: m.limit?.output || 4096,
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
// Process Groq models
|
|
307
|
-
if (data.groq?.models) {
|
|
308
|
-
for (const [modelId, model] of Object.entries(data.groq.models)) {
|
|
309
|
-
const m = model as ModelsDevModel;
|
|
310
|
-
if (m.tool_call !== true) continue;
|
|
311
|
-
|
|
312
|
-
models.push({
|
|
313
|
-
id: modelId,
|
|
314
|
-
name: m.name || modelId,
|
|
315
|
-
api: "openai-completions",
|
|
316
|
-
provider: "groq",
|
|
317
|
-
baseUrl: "https://api.groq.com/openai/v1",
|
|
318
|
-
reasoning: m.reasoning === true,
|
|
319
|
-
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
|
320
|
-
cost: {
|
|
321
|
-
input: m.cost?.input || 0,
|
|
322
|
-
output: m.cost?.output || 0,
|
|
323
|
-
cacheRead: m.cost?.cache_read || 0,
|
|
324
|
-
cacheWrite: m.cost?.cache_write || 0,
|
|
325
|
-
},
|
|
326
|
-
contextWindow: m.limit?.context || 4096,
|
|
327
|
-
maxTokens: m.limit?.output || 4096,
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
// Process Cerebras models
|
|
333
|
-
if (data.cerebras?.models) {
|
|
334
|
-
for (const [modelId, model] of Object.entries(data.cerebras.models)) {
|
|
335
|
-
const m = model as ModelsDevModel;
|
|
336
|
-
if (m.tool_call !== true) continue;
|
|
337
|
-
|
|
338
|
-
models.push({
|
|
339
|
-
id: modelId,
|
|
340
|
-
name: m.name || modelId,
|
|
341
|
-
api: "openai-completions",
|
|
342
|
-
provider: "cerebras",
|
|
343
|
-
baseUrl: "https://api.cerebras.ai/v1",
|
|
344
|
-
reasoning: m.reasoning === true,
|
|
345
|
-
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
|
346
|
-
cost: {
|
|
347
|
-
input: m.cost?.input || 0,
|
|
348
|
-
output: m.cost?.output || 0,
|
|
349
|
-
cacheRead: m.cost?.cache_read || 0,
|
|
350
|
-
cacheWrite: m.cost?.cache_write || 0,
|
|
351
|
-
},
|
|
352
|
-
contextWindow: m.limit?.context || 4096,
|
|
353
|
-
maxTokens: m.limit?.output || 4096,
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
// Process xAi models
|
|
359
|
-
if (data.xai?.models) {
|
|
360
|
-
for (const [modelId, model] of Object.entries(data.xai.models)) {
|
|
361
|
-
const m = model as ModelsDevModel;
|
|
362
|
-
if (m.tool_call !== true) continue;
|
|
363
|
-
|
|
364
|
-
models.push({
|
|
365
|
-
id: modelId,
|
|
366
|
-
name: m.name || modelId,
|
|
367
|
-
api: "openai-completions",
|
|
368
|
-
provider: "xai",
|
|
369
|
-
baseUrl: "https://api.x.ai/v1",
|
|
370
|
-
reasoning: m.reasoning === true,
|
|
371
|
-
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
|
372
|
-
cost: {
|
|
373
|
-
input: m.cost?.input || 0,
|
|
374
|
-
output: m.cost?.output || 0,
|
|
375
|
-
cacheRead: m.cost?.cache_read || 0,
|
|
376
|
-
cacheWrite: m.cost?.cache_write || 0,
|
|
377
|
-
},
|
|
378
|
-
contextWindow: m.limit?.context || 4096,
|
|
379
|
-
maxTokens: m.limit?.output || 4096,
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
// Process zAi models
|
|
385
|
-
if (data["zai-coding-plan"]?.models) {
|
|
386
|
-
for (const [modelId, model] of Object.entries(data["zai-coding-plan"].models)) {
|
|
387
|
-
const m = model as ModelsDevModel;
|
|
388
|
-
if (m.tool_call !== true) continue;
|
|
389
|
-
const supportsImage = m.modalities?.input?.includes("image");
|
|
390
|
-
|
|
391
|
-
models.push({
|
|
392
|
-
id: modelId,
|
|
393
|
-
name: m.name || modelId,
|
|
394
|
-
api: "openai-completions",
|
|
395
|
-
provider: "zai",
|
|
396
|
-
baseUrl: "https://api.z.ai/api/coding/paas/v4",
|
|
397
|
-
reasoning: m.reasoning === true,
|
|
398
|
-
input: supportsImage ? ["text", "image"] : ["text"],
|
|
399
|
-
cost: {
|
|
400
|
-
input: m.cost?.input || 0,
|
|
401
|
-
output: m.cost?.output || 0,
|
|
402
|
-
cacheRead: m.cost?.cache_read || 0,
|
|
403
|
-
cacheWrite: m.cost?.cache_write || 0,
|
|
404
|
-
},
|
|
405
|
-
compat: {
|
|
406
|
-
supportsDeveloperRole: false,
|
|
407
|
-
thinkingFormat: "zai",
|
|
408
|
-
...(!ZAI_TOOL_STREAM_UNSUPPORTED_MODELS.has(modelId) ? { zaiToolStream: true } : {}),
|
|
409
|
-
},
|
|
410
|
-
contextWindow: m.limit?.context || 4096,
|
|
411
|
-
maxTokens: m.limit?.output || 4096,
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
// Process Mistral models
|
|
417
|
-
if (data.mistral?.models) {
|
|
418
|
-
for (const [modelId, model] of Object.entries(data.mistral.models)) {
|
|
419
|
-
const m = model as ModelsDevModel;
|
|
420
|
-
if (m.tool_call !== true) continue;
|
|
421
|
-
|
|
422
|
-
models.push({
|
|
423
|
-
id: modelId,
|
|
424
|
-
name: m.name || modelId,
|
|
425
|
-
api: "mistral-conversations",
|
|
426
|
-
provider: "mistral",
|
|
427
|
-
baseUrl: "https://api.mistral.ai",
|
|
428
|
-
reasoning: m.reasoning === true,
|
|
429
|
-
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
|
430
|
-
cost: {
|
|
431
|
-
input: m.cost?.input || 0,
|
|
432
|
-
output: m.cost?.output || 0,
|
|
433
|
-
cacheRead: m.cost?.cache_read || 0,
|
|
434
|
-
cacheWrite: m.cost?.cache_write || 0,
|
|
435
|
-
},
|
|
436
|
-
contextWindow: m.limit?.context || 4096,
|
|
437
|
-
maxTokens: m.limit?.output || 4096,
|
|
438
|
-
});
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
// Process Hugging Face models
|
|
443
|
-
if (data.huggingface?.models) {
|
|
444
|
-
for (const [modelId, model] of Object.entries(data.huggingface.models)) {
|
|
445
|
-
const m = model as ModelsDevModel;
|
|
446
|
-
if (m.tool_call !== true) continue;
|
|
447
|
-
|
|
448
|
-
models.push({
|
|
449
|
-
id: modelId,
|
|
450
|
-
name: m.name || modelId,
|
|
451
|
-
api: "openai-completions",
|
|
452
|
-
provider: "huggingface",
|
|
453
|
-
baseUrl: "https://router.huggingface.co/v1",
|
|
454
|
-
reasoning: m.reasoning === true,
|
|
455
|
-
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
|
456
|
-
cost: {
|
|
457
|
-
input: m.cost?.input || 0,
|
|
458
|
-
output: m.cost?.output || 0,
|
|
459
|
-
cacheRead: m.cost?.cache_read || 0,
|
|
460
|
-
cacheWrite: m.cost?.cache_write || 0,
|
|
461
|
-
},
|
|
462
|
-
compat: {
|
|
463
|
-
supportsDeveloperRole: false,
|
|
464
|
-
},
|
|
465
|
-
contextWindow: m.limit?.context || 4096,
|
|
466
|
-
maxTokens: m.limit?.output || 4096,
|
|
467
|
-
});
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
// Process Fireworks models
|
|
472
|
-
if (data["fireworks-ai"]?.models) {
|
|
473
|
-
for (const [modelId, model] of Object.entries(data["fireworks-ai"].models)) {
|
|
474
|
-
const m = model as ModelsDevModel;
|
|
475
|
-
if (m.tool_call !== true) continue;
|
|
476
|
-
|
|
477
|
-
models.push({
|
|
478
|
-
id: modelId,
|
|
479
|
-
name: m.name || modelId,
|
|
480
|
-
api: "anthropic-messages",
|
|
481
|
-
provider: "fireworks",
|
|
482
|
-
// Fireworks Anthropic-compatible API - SDK appends /v1/messages
|
|
483
|
-
baseUrl: "https://api.fireworks.ai/inference",
|
|
484
|
-
reasoning: m.reasoning === true,
|
|
485
|
-
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
|
486
|
-
cost: {
|
|
487
|
-
input: m.cost?.input || 0,
|
|
488
|
-
output: m.cost?.output || 0,
|
|
489
|
-
cacheRead: m.cost?.cache_read || 0,
|
|
490
|
-
cacheWrite: m.cost?.cache_write || 0,
|
|
491
|
-
},
|
|
492
|
-
contextWindow: m.limit?.context || 4096,
|
|
493
|
-
maxTokens: m.limit?.output || 4096,
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
// Process OpenCode models (Zen and Go)
|
|
499
|
-
// API mapping based on provider.npm field:
|
|
500
|
-
// - @ai-sdk/openai → openai-responses
|
|
501
|
-
// - @ai-sdk/anthropic → anthropic-messages
|
|
502
|
-
// - @ai-sdk/google → google-generative-ai
|
|
503
|
-
// - null/undefined/@ai-sdk/openai-compatible → openai-completions
|
|
504
|
-
const opencodeVariants = [
|
|
505
|
-
{ key: "opencode", provider: "opencode", basePath: "https://opencode.ai/zen" },
|
|
506
|
-
{ key: "opencode-go", provider: "opencode-go", basePath: "https://opencode.ai/zen/go" },
|
|
507
|
-
] as const;
|
|
508
|
-
|
|
509
|
-
for (const variant of opencodeVariants) {
|
|
510
|
-
if (!data[variant.key]?.models) continue;
|
|
511
|
-
|
|
512
|
-
for (const [modelId, model] of Object.entries(data[variant.key].models)) {
|
|
513
|
-
const m = model as ModelsDevModel & { status?: string };
|
|
514
|
-
if (m.tool_call !== true) continue;
|
|
515
|
-
if (m.status === "deprecated") continue;
|
|
516
|
-
|
|
517
|
-
const npm = m.provider?.npm;
|
|
518
|
-
let api: Api;
|
|
519
|
-
let baseUrl: string;
|
|
520
|
-
let compat: OpenAICompletionsCompat | undefined;
|
|
521
|
-
|
|
522
|
-
if (npm === "@ai-sdk/openai") {
|
|
523
|
-
api = "openai-responses";
|
|
524
|
-
baseUrl = `${variant.basePath}/v1`;
|
|
525
|
-
} else if (npm === "@ai-sdk/anthropic") {
|
|
526
|
-
api = "anthropic-messages";
|
|
527
|
-
// Anthropic SDK appends /v1/messages to baseURL
|
|
528
|
-
baseUrl = variant.basePath;
|
|
529
|
-
} else if (npm === "@ai-sdk/google") {
|
|
530
|
-
api = "google-generative-ai";
|
|
531
|
-
baseUrl = `${variant.basePath}/v1`;
|
|
532
|
-
} else if (npm === "@ai-sdk/alibaba") {
|
|
533
|
-
api = "openai-completions";
|
|
534
|
-
baseUrl = `${variant.basePath}/v1`;
|
|
535
|
-
compat = { cacheControlFormat: "anthropic" };
|
|
536
|
-
} else {
|
|
537
|
-
// null, undefined, or @ai-sdk/openai-compatible
|
|
538
|
-
api = "openai-completions";
|
|
539
|
-
baseUrl = `${variant.basePath}/v1`;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
models.push({
|
|
543
|
-
id: modelId,
|
|
544
|
-
name: m.name || modelId,
|
|
545
|
-
api,
|
|
546
|
-
provider: variant.provider,
|
|
547
|
-
baseUrl,
|
|
548
|
-
reasoning: m.reasoning === true,
|
|
549
|
-
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
|
550
|
-
cost: {
|
|
551
|
-
input: m.cost?.input || 0,
|
|
552
|
-
output: m.cost?.output || 0,
|
|
553
|
-
cacheRead: m.cost?.cache_read || 0,
|
|
554
|
-
cacheWrite: m.cost?.cache_write || 0,
|
|
555
|
-
},
|
|
556
|
-
...(compat ? { compat } : {}),
|
|
557
|
-
contextWindow: m.limit?.context || 4096,
|
|
558
|
-
maxTokens: m.limit?.output || 4096,
|
|
559
|
-
});
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
// Process GitHub Copilot models
|
|
564
|
-
if (data["github-copilot"]?.models) {
|
|
565
|
-
for (const [modelId, model] of Object.entries(data["github-copilot"].models)) {
|
|
566
|
-
const m = model as ModelsDevModel & { status?: string };
|
|
567
|
-
if (m.tool_call !== true) continue;
|
|
568
|
-
if (m.status === "deprecated") continue;
|
|
569
|
-
|
|
570
|
-
// Claude 4.x models route to Anthropic Messages API
|
|
571
|
-
const isCopilotClaude4 = /^claude-(haiku|sonnet|opus)-4([.\-]|$)/.test(modelId);
|
|
572
|
-
// gpt-5 models require responses API, others use completions
|
|
573
|
-
const needsResponsesApi = modelId.startsWith("gpt-5") || modelId.startsWith("oswe");
|
|
574
|
-
|
|
575
|
-
const api: Api = isCopilotClaude4
|
|
576
|
-
? "anthropic-messages"
|
|
577
|
-
: needsResponsesApi
|
|
578
|
-
? "openai-responses"
|
|
579
|
-
: "openai-completions";
|
|
580
|
-
|
|
581
|
-
const copilotModel: Model<any> = {
|
|
582
|
-
id: modelId,
|
|
583
|
-
name: m.name || modelId,
|
|
584
|
-
api,
|
|
585
|
-
provider: "github-copilot",
|
|
586
|
-
baseUrl: "https://api.individual.githubcopilot.com",
|
|
587
|
-
reasoning: m.reasoning === true,
|
|
588
|
-
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
|
589
|
-
cost: {
|
|
590
|
-
input: m.cost?.input || 0,
|
|
591
|
-
output: m.cost?.output || 0,
|
|
592
|
-
cacheRead: m.cost?.cache_read || 0,
|
|
593
|
-
cacheWrite: m.cost?.cache_write || 0,
|
|
594
|
-
},
|
|
595
|
-
contextWindow: m.limit?.context || 128000,
|
|
596
|
-
maxTokens: m.limit?.output || 8192,
|
|
597
|
-
headers: { ...COPILOT_STATIC_HEADERS },
|
|
598
|
-
// compat only applies to openai-completions
|
|
599
|
-
...(api === "openai-completions" ? {
|
|
600
|
-
compat: {
|
|
601
|
-
supportsStore: false,
|
|
602
|
-
supportsDeveloperRole: false,
|
|
603
|
-
supportsReasoningEffort: false,
|
|
604
|
-
},
|
|
605
|
-
} : {}),
|
|
606
|
-
};
|
|
607
|
-
|
|
608
|
-
models.push(copilotModel);
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
// Process MiniMax models
|
|
613
|
-
const minimaxVariants = [
|
|
614
|
-
{ key: "minimax", provider: "minimax", baseUrl: "https://api.minimax.io/anthropic" },
|
|
615
|
-
{ key: "minimax-cn", provider: "minimax-cn", baseUrl: "https://api.minimaxi.com/anthropic" },
|
|
616
|
-
] as const;
|
|
617
|
-
|
|
618
|
-
for (const { key, provider, baseUrl } of minimaxVariants) {
|
|
619
|
-
if (data[key]?.models) {
|
|
620
|
-
for (const [modelId, model] of Object.entries(data[key].models)) {
|
|
621
|
-
const m = model as ModelsDevModel;
|
|
622
|
-
if (m.tool_call !== true) continue;
|
|
623
|
-
|
|
624
|
-
models.push({
|
|
625
|
-
id: modelId,
|
|
626
|
-
name: m.name || modelId,
|
|
627
|
-
api: "anthropic-messages",
|
|
628
|
-
provider,
|
|
629
|
-
// MiniMax's Anthropic-compatible API - SDK appends /v1/messages
|
|
630
|
-
baseUrl,
|
|
631
|
-
reasoning: m.reasoning === true,
|
|
632
|
-
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
|
633
|
-
cost: {
|
|
634
|
-
input: m.cost?.input || 0,
|
|
635
|
-
output: m.cost?.output || 0,
|
|
636
|
-
cacheRead: m.cost?.cache_read || 0,
|
|
637
|
-
cacheWrite: m.cost?.cache_write || 0,
|
|
638
|
-
},
|
|
639
|
-
contextWindow: m.limit?.context || 4096,
|
|
640
|
-
maxTokens: m.limit?.output || 4096,
|
|
641
|
-
});
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
// Process Kimi For Coding models
|
|
647
|
-
if (data["kimi-for-coding"]?.models) {
|
|
648
|
-
const kimiModels = data["kimi-for-coding"].models as Record<string, ModelsDevModel>;
|
|
649
|
-
const hasCanonicalModel = Object.prototype.hasOwnProperty.call(kimiModels, "kimi-for-coding");
|
|
650
|
-
|
|
651
|
-
for (const [modelId, model] of Object.entries(kimiModels)) {
|
|
652
|
-
const m = model as ModelsDevModel;
|
|
653
|
-
if (m.tool_call !== true) continue;
|
|
654
|
-
// models.dev still exposes deprecated "k2p5" in some snapshots.
|
|
655
|
-
// Normalize to the canonical model id and drop duplicates when canonical exists.
|
|
656
|
-
if (modelId === "k2p5" && hasCanonicalModel) continue;
|
|
657
|
-
|
|
658
|
-
const normalizedId = modelId === "k2p5" ? "kimi-for-coding" : modelId;
|
|
659
|
-
const normalizedName = modelId === "k2p5" ? "Kimi For Coding" : m.name || normalizedId;
|
|
660
|
-
|
|
661
|
-
models.push({
|
|
662
|
-
id: normalizedId,
|
|
663
|
-
name: normalizedName,
|
|
664
|
-
api: "anthropic-messages",
|
|
665
|
-
provider: "kimi-coding",
|
|
666
|
-
// Kimi For Coding's Anthropic-compatible API - SDK appends /v1/messages
|
|
667
|
-
baseUrl: "https://api.kimi.com/coding",
|
|
668
|
-
reasoning: m.reasoning === true,
|
|
669
|
-
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
|
670
|
-
cost: {
|
|
671
|
-
input: m.cost?.input || 0,
|
|
672
|
-
output: m.cost?.output || 0,
|
|
673
|
-
cacheRead: m.cost?.cache_read || 0,
|
|
674
|
-
cacheWrite: m.cost?.cache_write || 0,
|
|
675
|
-
},
|
|
676
|
-
contextWindow: m.limit?.context || 4096,
|
|
677
|
-
maxTokens: m.limit?.output || 4096,
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
console.log(`Loaded ${models.length} tool-capable models from models.dev`);
|
|
683
|
-
return models;
|
|
684
|
-
} catch (error) {
|
|
685
|
-
console.error("Failed to load models.dev data:", error);
|
|
686
|
-
return [];
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
async function generateModels() {
|
|
691
|
-
// Fetch models from both sources
|
|
692
|
-
// models.dev: Anthropic, Google, OpenAI, Groq, Cerebras
|
|
693
|
-
// OpenRouter: xAI and other providers (excluding Anthropic, Google, OpenAI)
|
|
694
|
-
// AI Gateway: OpenAI-compatible catalog with tool-capable models
|
|
695
|
-
const modelsDevModels = await loadModelsDevData();
|
|
696
|
-
const openRouterModels = await fetchOpenRouterModels();
|
|
697
|
-
const aiGatewayModels = await fetchAiGatewayModels();
|
|
698
|
-
|
|
699
|
-
// Combine models (models.dev has priority)
|
|
700
|
-
const allModels = [...modelsDevModels, ...openRouterModels, ...aiGatewayModels].filter(
|
|
701
|
-
(model) =>
|
|
702
|
-
!((model.provider === "opencode" || model.provider === "opencode-go") && model.id === "gpt-5.3-codex-spark"),
|
|
703
|
-
);
|
|
704
|
-
|
|
705
|
-
// Fix incorrect cache pricing for Claude Opus 4.5 from models.dev
|
|
706
|
-
// models.dev has 3x the correct pricing (1.5/18.75 instead of 0.5/6.25)
|
|
707
|
-
const opus45 = allModels.find(m => m.provider === "anthropic" && m.id === "claude-opus-4-5");
|
|
708
|
-
if (opus45) {
|
|
709
|
-
opus45.cost.cacheRead = 0.5;
|
|
710
|
-
opus45.cost.cacheWrite = 6.25;
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
// Temporary overrides until upstream model metadata is corrected.
|
|
714
|
-
for (const candidate of allModels) {
|
|
715
|
-
if (candidate.provider === "amazon-bedrock" && candidate.id.includes("anthropic.claude-opus-4-6-v1")) {
|
|
716
|
-
candidate.cost.cacheRead = 0.5;
|
|
717
|
-
candidate.cost.cacheWrite = 6.25;
|
|
718
|
-
}
|
|
719
|
-
if (
|
|
720
|
-
(candidate.provider === "anthropic" ||
|
|
721
|
-
candidate.provider === "opencode" ||
|
|
722
|
-
candidate.provider === "opencode-go" ||
|
|
723
|
-
candidate.provider === "github-copilot") &&
|
|
724
|
-
(candidate.id === "claude-opus-4-6" ||
|
|
725
|
-
candidate.id === "claude-sonnet-4-6" ||
|
|
726
|
-
candidate.id === "claude-opus-4.6" ||
|
|
727
|
-
candidate.id === "claude-sonnet-4.6")
|
|
728
|
-
) {
|
|
729
|
-
candidate.contextWindow = 1000000;
|
|
730
|
-
}
|
|
731
|
-
if (
|
|
732
|
-
candidate.provider === "google-antigravity" &&
|
|
733
|
-
(candidate.id === "claude-opus-4-6-thinking" || candidate.id === "claude-sonnet-4-6")
|
|
734
|
-
) {
|
|
735
|
-
candidate.contextWindow = 1000000;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
// OpenCode variants list Claude Sonnet 4/4.5 with 1M context, actual limit is 200K
|
|
739
|
-
if (
|
|
740
|
-
(candidate.provider === "opencode" || candidate.provider === "opencode-go") &&
|
|
741
|
-
(candidate.id === "claude-sonnet-4-5" || candidate.id === "claude-sonnet-4")
|
|
742
|
-
) {
|
|
743
|
-
candidate.contextWindow = 200000;
|
|
744
|
-
}
|
|
745
|
-
if ((candidate.provider === "opencode" || candidate.provider === "opencode-go") && candidate.id === "gpt-5.4") {
|
|
746
|
-
candidate.contextWindow = 272000;
|
|
747
|
-
candidate.maxTokens = 128000;
|
|
748
|
-
}
|
|
749
|
-
if (candidate.provider === "openai" && candidate.id === "gpt-5.4") {
|
|
750
|
-
candidate.contextWindow = 272000;
|
|
751
|
-
candidate.maxTokens = 128000;
|
|
752
|
-
}
|
|
753
|
-
// Keep selected OpenRouter model metadata stable until upstream settles.
|
|
754
|
-
if (candidate.provider === "openrouter" && candidate.id === "moonshotai/kimi-k2.5") {
|
|
755
|
-
candidate.cost.input = 0.41;
|
|
756
|
-
candidate.cost.output = 2.06;
|
|
757
|
-
candidate.cost.cacheRead = 0.07;
|
|
758
|
-
candidate.maxTokens = 4096;
|
|
759
|
-
}
|
|
760
|
-
if (candidate.provider === "openrouter" && candidate.id === "z-ai/glm-5") {
|
|
761
|
-
candidate.cost.input = 0.6;
|
|
762
|
-
candidate.cost.output = 1.9;
|
|
763
|
-
candidate.cost.cacheRead = 0.119;
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
// Add missing EU Opus 4.6 profile
|
|
770
|
-
if (!allModels.some((m) => m.provider === "amazon-bedrock" && m.id === "eu.anthropic.claude-opus-4-6-v1")) {
|
|
771
|
-
allModels.push({
|
|
772
|
-
id: "eu.anthropic.claude-opus-4-6-v1",
|
|
773
|
-
name: "Claude Opus 4.6 (EU)",
|
|
774
|
-
api: "bedrock-converse-stream",
|
|
775
|
-
provider: "amazon-bedrock",
|
|
776
|
-
baseUrl: getBedrockBaseUrl("eu.anthropic.claude-opus-4-6-v1"),
|
|
777
|
-
reasoning: true,
|
|
778
|
-
input: ["text", "image"],
|
|
779
|
-
cost: {
|
|
780
|
-
input: 5,
|
|
781
|
-
output: 25,
|
|
782
|
-
cacheRead: 0.5,
|
|
783
|
-
cacheWrite: 6.25,
|
|
784
|
-
},
|
|
785
|
-
contextWindow: 200000,
|
|
786
|
-
maxTokens: 128000,
|
|
787
|
-
});
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
// Add missing Claude Opus 4.6
|
|
791
|
-
if (!allModels.some(m => m.provider === "anthropic" && m.id === "claude-opus-4-6")) {
|
|
792
|
-
allModels.push({
|
|
793
|
-
id: "claude-opus-4-6",
|
|
794
|
-
name: "Claude Opus 4.6",
|
|
795
|
-
api: "anthropic-messages",
|
|
796
|
-
baseUrl: "https://api.anthropic.com",
|
|
797
|
-
provider: "anthropic",
|
|
798
|
-
reasoning: true,
|
|
799
|
-
input: ["text", "image"],
|
|
800
|
-
cost: {
|
|
801
|
-
input: 5,
|
|
802
|
-
output: 25,
|
|
803
|
-
cacheRead: 0.5,
|
|
804
|
-
cacheWrite: 6.25,
|
|
805
|
-
},
|
|
806
|
-
contextWindow: 1000000,
|
|
807
|
-
maxTokens: 128000,
|
|
808
|
-
});
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
// Add missing Claude Opus 4.7
|
|
812
|
-
if (!allModels.some(m => m.provider === "anthropic" && m.id === "claude-opus-4-7")) {
|
|
813
|
-
allModels.push({
|
|
814
|
-
id: "claude-opus-4-7",
|
|
815
|
-
name: "Claude Opus 4.7",
|
|
816
|
-
api: "anthropic-messages",
|
|
817
|
-
baseUrl: "https://api.anthropic.com",
|
|
818
|
-
provider: "anthropic",
|
|
819
|
-
reasoning: true,
|
|
820
|
-
input: ["text", "image"],
|
|
821
|
-
cost: {
|
|
822
|
-
input: 5,
|
|
823
|
-
output: 25,
|
|
824
|
-
cacheRead: 0.5,
|
|
825
|
-
cacheWrite: 6.25,
|
|
826
|
-
},
|
|
827
|
-
contextWindow: 1000000,
|
|
828
|
-
maxTokens: 128000,
|
|
829
|
-
});
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
// Add missing Claude Sonnet 4.6
|
|
833
|
-
if (!allModels.some(m => m.provider === "anthropic" && m.id === "claude-sonnet-4-6")) {
|
|
834
|
-
allModels.push({
|
|
835
|
-
id: "claude-sonnet-4-6",
|
|
836
|
-
name: "Claude Sonnet 4.6",
|
|
837
|
-
api: "anthropic-messages",
|
|
838
|
-
baseUrl: "https://api.anthropic.com",
|
|
839
|
-
provider: "anthropic",
|
|
840
|
-
reasoning: true,
|
|
841
|
-
input: ["text", "image"],
|
|
842
|
-
cost: {
|
|
843
|
-
input: 3,
|
|
844
|
-
output: 15,
|
|
845
|
-
cacheRead: 0.3,
|
|
846
|
-
cacheWrite: 3.75,
|
|
847
|
-
},
|
|
848
|
-
contextWindow: 1000000,
|
|
849
|
-
maxTokens: 64000,
|
|
850
|
-
});
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
// Add missing Gemini 3.1 Flash Lite Preview until models.dev includes it.
|
|
854
|
-
if (!allModels.some((m) => m.provider === "google" && m.id === "gemini-3.1-flash-lite-preview")) {
|
|
855
|
-
allModels.push({
|
|
856
|
-
id: "gemini-3.1-flash-lite-preview",
|
|
857
|
-
name: "Gemini 3.1 Flash Lite Preview",
|
|
858
|
-
api: "google-generative-ai",
|
|
859
|
-
baseUrl: "https://generativelanguage.googleapis.com/v1beta",
|
|
860
|
-
provider: "google",
|
|
861
|
-
reasoning: true,
|
|
862
|
-
input: ["text", "image"],
|
|
863
|
-
cost: {
|
|
864
|
-
input: 0,
|
|
865
|
-
output: 0,
|
|
866
|
-
cacheRead: 0,
|
|
867
|
-
cacheWrite: 0,
|
|
868
|
-
},
|
|
869
|
-
contextWindow: 1048576,
|
|
870
|
-
maxTokens: 65536,
|
|
871
|
-
});
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
// Add missing gpt models
|
|
875
|
-
if (!allModels.some(m => m.provider === "openai" && m.id === "gpt-5-chat-latest")) {
|
|
876
|
-
allModels.push({
|
|
877
|
-
id: "gpt-5-chat-latest",
|
|
878
|
-
name: "GPT-5 Chat Latest",
|
|
879
|
-
api: "openai-responses",
|
|
880
|
-
baseUrl: "https://api.openai.com/v1",
|
|
881
|
-
provider: "openai",
|
|
882
|
-
reasoning: false,
|
|
883
|
-
input: ["text", "image"],
|
|
884
|
-
cost: {
|
|
885
|
-
input: 1.25,
|
|
886
|
-
output: 10,
|
|
887
|
-
cacheRead: 0.125,
|
|
888
|
-
cacheWrite: 0,
|
|
889
|
-
},
|
|
890
|
-
contextWindow: 128000,
|
|
891
|
-
maxTokens: 16384,
|
|
892
|
-
});
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
if (!allModels.some(m => m.provider === "openai" && m.id === "gpt-5.1-codex")) {
|
|
896
|
-
allModels.push({
|
|
897
|
-
id: "gpt-5.1-codex",
|
|
898
|
-
name: "GPT-5.1 Codex",
|
|
899
|
-
api: "openai-responses",
|
|
900
|
-
baseUrl: "https://api.openai.com/v1",
|
|
901
|
-
provider: "openai",
|
|
902
|
-
reasoning: true,
|
|
903
|
-
input: ["text", "image"],
|
|
904
|
-
cost: {
|
|
905
|
-
input: 1.25,
|
|
906
|
-
output: 5,
|
|
907
|
-
cacheRead: 0.125,
|
|
908
|
-
cacheWrite: 1.25,
|
|
909
|
-
},
|
|
910
|
-
contextWindow: 400000,
|
|
911
|
-
maxTokens: 128000,
|
|
912
|
-
});
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
if (!allModels.some(m => m.provider === "openai" && m.id === "gpt-5.1-codex-max")) {
|
|
916
|
-
allModels.push({
|
|
917
|
-
id: "gpt-5.1-codex-max",
|
|
918
|
-
name: "GPT-5.1 Codex Max",
|
|
919
|
-
api: "openai-responses",
|
|
920
|
-
baseUrl: "https://api.openai.com/v1",
|
|
921
|
-
provider: "openai",
|
|
922
|
-
reasoning: true,
|
|
923
|
-
input: ["text", "image"],
|
|
924
|
-
cost: {
|
|
925
|
-
input: 1.25,
|
|
926
|
-
output: 10,
|
|
927
|
-
cacheRead: 0.125,
|
|
928
|
-
cacheWrite: 0,
|
|
929
|
-
},
|
|
930
|
-
contextWindow: 400000,
|
|
931
|
-
maxTokens: 128000,
|
|
932
|
-
});
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
if (!allModels.some(m => m.provider === "openai" && m.id === "gpt-5.3-codex-spark")) {
|
|
936
|
-
allModels.push({
|
|
937
|
-
id: "gpt-5.3-codex-spark",
|
|
938
|
-
name: "GPT-5.3 Codex Spark",
|
|
939
|
-
api: "openai-responses",
|
|
940
|
-
baseUrl: "https://api.openai.com/v1",
|
|
941
|
-
provider: "openai",
|
|
942
|
-
reasoning: true,
|
|
943
|
-
input: ["text"],
|
|
944
|
-
cost: {
|
|
945
|
-
input: 0,
|
|
946
|
-
output: 0,
|
|
947
|
-
cacheRead: 0,
|
|
948
|
-
cacheWrite: 0,
|
|
949
|
-
},
|
|
950
|
-
contextWindow: 128000,
|
|
951
|
-
maxTokens: 16384,
|
|
952
|
-
});
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
// Add missing GitHub Copilot GPT-5.3 models until models.dev includes them.
|
|
956
|
-
const copilotBaseModel = allModels.find(
|
|
957
|
-
(m) => m.provider === "github-copilot" && m.id === "gpt-5.2-codex",
|
|
958
|
-
);
|
|
959
|
-
if (copilotBaseModel) {
|
|
960
|
-
if (!allModels.some((m) => m.provider === "github-copilot" && m.id === "gpt-5.3-codex")) {
|
|
961
|
-
allModels.push({
|
|
962
|
-
...copilotBaseModel,
|
|
963
|
-
id: "gpt-5.3-codex",
|
|
964
|
-
name: "GPT-5.3 Codex",
|
|
965
|
-
});
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
if (!allModels.some((m) => m.provider === "openai" && m.id === "gpt-5.4")) {
|
|
970
|
-
allModels.push({
|
|
971
|
-
id: "gpt-5.4",
|
|
972
|
-
name: "GPT-5.4",
|
|
973
|
-
api: "openai-responses",
|
|
974
|
-
baseUrl: "https://api.openai.com/v1",
|
|
975
|
-
provider: "openai",
|
|
976
|
-
reasoning: true,
|
|
977
|
-
input: ["text", "image"],
|
|
978
|
-
cost: {
|
|
979
|
-
input: 2.5,
|
|
980
|
-
output: 15,
|
|
981
|
-
cacheRead: 0.25,
|
|
982
|
-
cacheWrite: 0,
|
|
983
|
-
},
|
|
984
|
-
contextWindow: 272000,
|
|
985
|
-
maxTokens: 128000,
|
|
986
|
-
});
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
const minimaxDirectSupportedIds = new Set(["MiniMax-M2.7", "MiniMax-M2.7-highspeed"]);
|
|
990
|
-
|
|
991
|
-
for (const candidate of allModels) {
|
|
992
|
-
if (
|
|
993
|
-
(candidate.provider === "minimax" || candidate.provider === "minimax-cn") &&
|
|
994
|
-
minimaxDirectSupportedIds.has(candidate.id)
|
|
995
|
-
) {
|
|
996
|
-
candidate.contextWindow = 204800;
|
|
997
|
-
candidate.maxTokens = 131072;
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
for (let i = allModels.length - 1; i >= 0; i--) {
|
|
1002
|
-
const candidate = allModels[i];
|
|
1003
|
-
if (
|
|
1004
|
-
(candidate.provider === "minimax" || candidate.provider === "minimax-cn") &&
|
|
1005
|
-
!minimaxDirectSupportedIds.has(candidate.id)
|
|
1006
|
-
) {
|
|
1007
|
-
allModels.splice(i, 1);
|
|
1008
|
-
}
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
// OpenAI Codex (ChatGPT OAuth) models
|
|
1012
|
-
// NOTE: These are not fetched from models.dev; we keep a small, explicit list to avoid aliases.
|
|
1013
|
-
// Context window is based on observed server limits (400s above ~272k), not marketing numbers.
|
|
1014
|
-
const CODEX_BASE_URL = "https://chatgpt.com/backend-api";
|
|
1015
|
-
const CODEX_CONTEXT = 272000;
|
|
1016
|
-
const CODEX_MAX_TOKENS = 128000;
|
|
1017
|
-
const codexModels: Model<"openai-codex-responses">[] = [
|
|
1018
|
-
{
|
|
1019
|
-
id: "gpt-5.1",
|
|
1020
|
-
name: "GPT-5.1",
|
|
1021
|
-
api: "openai-codex-responses",
|
|
1022
|
-
provider: "openai-codex",
|
|
1023
|
-
baseUrl: CODEX_BASE_URL,
|
|
1024
|
-
reasoning: true,
|
|
1025
|
-
input: ["text", "image"],
|
|
1026
|
-
cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 },
|
|
1027
|
-
contextWindow: CODEX_CONTEXT,
|
|
1028
|
-
maxTokens: CODEX_MAX_TOKENS,
|
|
1029
|
-
},
|
|
1030
|
-
{
|
|
1031
|
-
id: "gpt-5.1-codex-max",
|
|
1032
|
-
name: "GPT-5.1 Codex Max",
|
|
1033
|
-
api: "openai-codex-responses",
|
|
1034
|
-
provider: "openai-codex",
|
|
1035
|
-
baseUrl: CODEX_BASE_URL,
|
|
1036
|
-
reasoning: true,
|
|
1037
|
-
input: ["text", "image"],
|
|
1038
|
-
cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 },
|
|
1039
|
-
contextWindow: CODEX_CONTEXT,
|
|
1040
|
-
maxTokens: CODEX_MAX_TOKENS,
|
|
1041
|
-
},
|
|
1042
|
-
{
|
|
1043
|
-
id: "gpt-5.1-codex-mini",
|
|
1044
|
-
name: "GPT-5.1 Codex Mini",
|
|
1045
|
-
api: "openai-codex-responses",
|
|
1046
|
-
provider: "openai-codex",
|
|
1047
|
-
baseUrl: CODEX_BASE_URL,
|
|
1048
|
-
reasoning: true,
|
|
1049
|
-
input: ["text", "image"],
|
|
1050
|
-
cost: { input: 0.25, output: 2, cacheRead: 0.025, cacheWrite: 0 },
|
|
1051
|
-
contextWindow: CODEX_CONTEXT,
|
|
1052
|
-
maxTokens: CODEX_MAX_TOKENS,
|
|
1053
|
-
},
|
|
1054
|
-
{
|
|
1055
|
-
id: "gpt-5.2",
|
|
1056
|
-
name: "GPT-5.2",
|
|
1057
|
-
api: "openai-codex-responses",
|
|
1058
|
-
provider: "openai-codex",
|
|
1059
|
-
baseUrl: CODEX_BASE_URL,
|
|
1060
|
-
reasoning: true,
|
|
1061
|
-
input: ["text", "image"],
|
|
1062
|
-
cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 },
|
|
1063
|
-
contextWindow: CODEX_CONTEXT,
|
|
1064
|
-
maxTokens: CODEX_MAX_TOKENS,
|
|
1065
|
-
},
|
|
1066
|
-
{
|
|
1067
|
-
id: "gpt-5.2-codex",
|
|
1068
|
-
name: "GPT-5.2 Codex",
|
|
1069
|
-
api: "openai-codex-responses",
|
|
1070
|
-
provider: "openai-codex",
|
|
1071
|
-
baseUrl: CODEX_BASE_URL,
|
|
1072
|
-
reasoning: true,
|
|
1073
|
-
input: ["text", "image"],
|
|
1074
|
-
cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 },
|
|
1075
|
-
contextWindow: CODEX_CONTEXT,
|
|
1076
|
-
maxTokens: CODEX_MAX_TOKENS,
|
|
1077
|
-
},
|
|
1078
|
-
{
|
|
1079
|
-
id: "gpt-5.3-codex",
|
|
1080
|
-
name: "GPT-5.3 Codex",
|
|
1081
|
-
api: "openai-codex-responses",
|
|
1082
|
-
provider: "openai-codex",
|
|
1083
|
-
baseUrl: CODEX_BASE_URL,
|
|
1084
|
-
reasoning: true,
|
|
1085
|
-
input: ["text", "image"],
|
|
1086
|
-
cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 },
|
|
1087
|
-
contextWindow: CODEX_CONTEXT,
|
|
1088
|
-
maxTokens: CODEX_MAX_TOKENS,
|
|
1089
|
-
},
|
|
1090
|
-
{
|
|
1091
|
-
id: "gpt-5.4",
|
|
1092
|
-
name: "GPT-5.4",
|
|
1093
|
-
api: "openai-codex-responses",
|
|
1094
|
-
provider: "openai-codex",
|
|
1095
|
-
baseUrl: CODEX_BASE_URL,
|
|
1096
|
-
reasoning: true,
|
|
1097
|
-
input: ["text", "image"],
|
|
1098
|
-
cost: { input: 2.5, output: 15, cacheRead: 0.25, cacheWrite: 0 },
|
|
1099
|
-
contextWindow: CODEX_CONTEXT,
|
|
1100
|
-
maxTokens: CODEX_MAX_TOKENS,
|
|
1101
|
-
},
|
|
1102
|
-
{
|
|
1103
|
-
id: "gpt-5.4-mini",
|
|
1104
|
-
name: "GPT-5.4 Mini",
|
|
1105
|
-
api: "openai-codex-responses",
|
|
1106
|
-
provider: "openai-codex",
|
|
1107
|
-
baseUrl: CODEX_BASE_URL,
|
|
1108
|
-
reasoning: true,
|
|
1109
|
-
input: ["text", "image"],
|
|
1110
|
-
cost: { input: 0.75, output: 4.5, cacheRead: 0.075, cacheWrite: 0 },
|
|
1111
|
-
contextWindow: CODEX_CONTEXT,
|
|
1112
|
-
maxTokens: CODEX_MAX_TOKENS,
|
|
1113
|
-
},
|
|
1114
|
-
{
|
|
1115
|
-
id: "gpt-5.3-codex-spark",
|
|
1116
|
-
name: "GPT-5.3 Codex Spark",
|
|
1117
|
-
api: "openai-codex-responses",
|
|
1118
|
-
provider: "openai-codex",
|
|
1119
|
-
baseUrl: CODEX_BASE_URL,
|
|
1120
|
-
reasoning: true,
|
|
1121
|
-
input: ["text"],
|
|
1122
|
-
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
1123
|
-
contextWindow: 128000,
|
|
1124
|
-
maxTokens: CODEX_MAX_TOKENS,
|
|
1125
|
-
},
|
|
1126
|
-
];
|
|
1127
|
-
allModels.push(...codexModels);
|
|
1128
|
-
|
|
1129
|
-
// Add missing Grok models
|
|
1130
|
-
if (!allModels.some(m => m.provider === "xai" && m.id === "grok-code-fast-1")) {
|
|
1131
|
-
allModels.push({
|
|
1132
|
-
id: "grok-code-fast-1",
|
|
1133
|
-
name: "Grok Code Fast 1",
|
|
1134
|
-
api: "openai-completions",
|
|
1135
|
-
baseUrl: "https://api.x.ai/v1",
|
|
1136
|
-
provider: "xai",
|
|
1137
|
-
reasoning: false,
|
|
1138
|
-
input: ["text"],
|
|
1139
|
-
cost: {
|
|
1140
|
-
input: 0.2,
|
|
1141
|
-
output: 1.5,
|
|
1142
|
-
cacheRead: 0.02,
|
|
1143
|
-
cacheWrite: 0,
|
|
1144
|
-
},
|
|
1145
|
-
contextWindow: 32768,
|
|
1146
|
-
maxTokens: 8192,
|
|
1147
|
-
});
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
// Add "auto" alias for openrouter/auto
|
|
1151
|
-
if (!allModels.some(m => m.provider === "openrouter" && m.id === "auto")) {
|
|
1152
|
-
allModels.push({
|
|
1153
|
-
id: "auto",
|
|
1154
|
-
name: "Auto",
|
|
1155
|
-
api: "openai-completions",
|
|
1156
|
-
provider: "openrouter",
|
|
1157
|
-
baseUrl: "https://openrouter.ai/api/v1",
|
|
1158
|
-
reasoning: true,
|
|
1159
|
-
input: ["text", "image"],
|
|
1160
|
-
cost: {
|
|
1161
|
-
// we dont know about the costs because OpenRouter auto routes to different models
|
|
1162
|
-
// and then charges you for the underlying used model
|
|
1163
|
-
input:0,
|
|
1164
|
-
output:0,
|
|
1165
|
-
cacheRead:0,
|
|
1166
|
-
cacheWrite:0,
|
|
1167
|
-
},
|
|
1168
|
-
contextWindow: 2000000,
|
|
1169
|
-
maxTokens: 30000,
|
|
1170
|
-
});
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
// Google Cloud Code Assist models (Gemini CLI)
|
|
1174
|
-
// Uses production endpoint, standard Gemini models only
|
|
1175
|
-
const CLOUD_CODE_ASSIST_ENDPOINT = "https://cloudcode-pa.googleapis.com";
|
|
1176
|
-
const cloudCodeAssistModels: Model<"google-gemini-cli">[] = [
|
|
1177
|
-
{
|
|
1178
|
-
id: "gemini-2.5-pro",
|
|
1179
|
-
name: "Gemini 2.5 Pro (Cloud Code Assist)",
|
|
1180
|
-
api: "google-gemini-cli",
|
|
1181
|
-
provider: "google-gemini-cli",
|
|
1182
|
-
baseUrl: CLOUD_CODE_ASSIST_ENDPOINT,
|
|
1183
|
-
reasoning: true,
|
|
1184
|
-
input: ["text", "image"],
|
|
1185
|
-
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
1186
|
-
contextWindow: 1048576,
|
|
1187
|
-
maxTokens: 65535,
|
|
1188
|
-
},
|
|
1189
|
-
{
|
|
1190
|
-
id: "gemini-2.5-flash",
|
|
1191
|
-
name: "Gemini 2.5 Flash (Cloud Code Assist)",
|
|
1192
|
-
api: "google-gemini-cli",
|
|
1193
|
-
provider: "google-gemini-cli",
|
|
1194
|
-
baseUrl: CLOUD_CODE_ASSIST_ENDPOINT,
|
|
1195
|
-
reasoning: true,
|
|
1196
|
-
input: ["text", "image"],
|
|
1197
|
-
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
1198
|
-
contextWindow: 1048576,
|
|
1199
|
-
maxTokens: 65535,
|
|
1200
|
-
},
|
|
1201
|
-
{
|
|
1202
|
-
id: "gemini-2.0-flash",
|
|
1203
|
-
name: "Gemini 2.0 Flash (Cloud Code Assist)",
|
|
1204
|
-
api: "google-gemini-cli",
|
|
1205
|
-
provider: "google-gemini-cli",
|
|
1206
|
-
baseUrl: CLOUD_CODE_ASSIST_ENDPOINT,
|
|
1207
|
-
reasoning: false,
|
|
1208
|
-
input: ["text", "image"],
|
|
1209
|
-
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
1210
|
-
contextWindow: 1048576,
|
|
1211
|
-
maxTokens: 8192,
|
|
1212
|
-
},
|
|
1213
|
-
{
|
|
1214
|
-
id: "gemini-3-pro-preview",
|
|
1215
|
-
name: "Gemini 3 Pro Preview (Cloud Code Assist)",
|
|
1216
|
-
api: "google-gemini-cli",
|
|
1217
|
-
provider: "google-gemini-cli",
|
|
1218
|
-
baseUrl: CLOUD_CODE_ASSIST_ENDPOINT,
|
|
1219
|
-
reasoning: true,
|
|
1220
|
-
input: ["text", "image"],
|
|
1221
|
-
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
1222
|
-
contextWindow: 1048576,
|
|
1223
|
-
maxTokens: 65535,
|
|
1224
|
-
},
|
|
1225
|
-
{
|
|
1226
|
-
id: "gemini-3-flash-preview",
|
|
1227
|
-
name: "Gemini 3 Flash Preview (Cloud Code Assist)",
|
|
1228
|
-
api: "google-gemini-cli",
|
|
1229
|
-
provider: "google-gemini-cli",
|
|
1230
|
-
baseUrl: CLOUD_CODE_ASSIST_ENDPOINT,
|
|
1231
|
-
reasoning: true,
|
|
1232
|
-
input: ["text", "image"],
|
|
1233
|
-
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
1234
|
-
contextWindow: 1048576,
|
|
1235
|
-
maxTokens: 65535,
|
|
1236
|
-
},
|
|
1237
|
-
{
|
|
1238
|
-
id: "gemini-3.1-flash-lite-preview",
|
|
1239
|
-
name: "Gemini 3.1 Flash Lite Preview (Cloud Code Assist)",
|
|
1240
|
-
api: "google-gemini-cli",
|
|
1241
|
-
provider: "google-gemini-cli",
|
|
1242
|
-
baseUrl: CLOUD_CODE_ASSIST_ENDPOINT,
|
|
1243
|
-
reasoning: true,
|
|
1244
|
-
input: ["text", "image"],
|
|
1245
|
-
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
1246
|
-
contextWindow: 1048576,
|
|
1247
|
-
maxTokens: 65535,
|
|
1248
|
-
},
|
|
1249
|
-
{
|
|
1250
|
-
id: "gemini-3.1-pro-preview",
|
|
1251
|
-
name: "Gemini 3.1 Pro Preview (Cloud Code Assist)",
|
|
1252
|
-
api: "google-gemini-cli",
|
|
1253
|
-
provider: "google-gemini-cli",
|
|
1254
|
-
baseUrl: CLOUD_CODE_ASSIST_ENDPOINT,
|
|
1255
|
-
reasoning: true,
|
|
1256
|
-
input: ["text", "image"],
|
|
1257
|
-
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
1258
|
-
contextWindow: 1048576,
|
|
1259
|
-
maxTokens: 65535,
|
|
1260
|
-
},
|
|
1261
|
-
];
|
|
1262
|
-
allModels.push(...cloudCodeAssistModels);
|
|
1263
|
-
|
|
1264
|
-
// Antigravity models (Gemini 3, Claude, GPT-OSS via Google Cloud)
|
|
1265
|
-
// Uses sandbox endpoint and different OAuth credentials for access to additional models
|
|
1266
|
-
const ANTIGRAVITY_ENDPOINT = "https://daily-cloudcode-pa.sandbox.googleapis.com";
|
|
1267
|
-
const antigravityModels: Model<"google-gemini-cli">[] = [
|
|
1268
|
-
{
|
|
1269
|
-
id: "gemini-3.1-pro-high",
|
|
1270
|
-
name: "Gemini 3.1 Pro High (Antigravity)",
|
|
1271
|
-
api: "google-gemini-cli",
|
|
1272
|
-
provider: "google-antigravity",
|
|
1273
|
-
baseUrl: ANTIGRAVITY_ENDPOINT,
|
|
1274
|
-
reasoning: true,
|
|
1275
|
-
input: ["text", "image"],
|
|
1276
|
-
// the Model type doesn't seem to support having extended-context costs, so I'm just using the pricing for <200k input
|
|
1277
|
-
cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 2.375 },
|
|
1278
|
-
contextWindow: 1048576,
|
|
1279
|
-
maxTokens: 65535,
|
|
1280
|
-
},
|
|
1281
|
-
{
|
|
1282
|
-
id: "gemini-3.1-pro-low",
|
|
1283
|
-
name: "Gemini 3.1 Pro Low (Antigravity)",
|
|
1284
|
-
api: "google-gemini-cli",
|
|
1285
|
-
provider: "google-antigravity",
|
|
1286
|
-
baseUrl: ANTIGRAVITY_ENDPOINT,
|
|
1287
|
-
reasoning: true,
|
|
1288
|
-
input: ["text", "image"],
|
|
1289
|
-
// the Model type doesn't seem to support having extended-context costs, so I'm just using the pricing for <200k input
|
|
1290
|
-
cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 2.375 },
|
|
1291
|
-
contextWindow: 1048576,
|
|
1292
|
-
maxTokens: 65535,
|
|
1293
|
-
},
|
|
1294
|
-
{
|
|
1295
|
-
id: "gemini-3-flash",
|
|
1296
|
-
name: "Gemini 3 Flash (Antigravity)",
|
|
1297
|
-
api: "google-gemini-cli",
|
|
1298
|
-
provider: "google-antigravity",
|
|
1299
|
-
baseUrl: ANTIGRAVITY_ENDPOINT,
|
|
1300
|
-
reasoning: true,
|
|
1301
|
-
input: ["text", "image"],
|
|
1302
|
-
cost: { input: 0.5, output: 3, cacheRead: 0.5, cacheWrite: 0 },
|
|
1303
|
-
contextWindow: 1048576,
|
|
1304
|
-
maxTokens: 65535,
|
|
1305
|
-
},
|
|
1306
|
-
{
|
|
1307
|
-
id: "claude-sonnet-4-5",
|
|
1308
|
-
name: "Claude Sonnet 4.5 (Antigravity)",
|
|
1309
|
-
api: "google-gemini-cli",
|
|
1310
|
-
provider: "google-antigravity",
|
|
1311
|
-
baseUrl: ANTIGRAVITY_ENDPOINT,
|
|
1312
|
-
reasoning: false,
|
|
1313
|
-
input: ["text", "image"],
|
|
1314
|
-
cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 },
|
|
1315
|
-
contextWindow: 200000,
|
|
1316
|
-
maxTokens: 64000,
|
|
1317
|
-
},
|
|
1318
|
-
{
|
|
1319
|
-
id: "claude-sonnet-4-5-thinking",
|
|
1320
|
-
name: "Claude Sonnet 4.5 Thinking (Antigravity)",
|
|
1321
|
-
api: "google-gemini-cli",
|
|
1322
|
-
provider: "google-antigravity",
|
|
1323
|
-
baseUrl: ANTIGRAVITY_ENDPOINT,
|
|
1324
|
-
reasoning: true,
|
|
1325
|
-
input: ["text", "image"],
|
|
1326
|
-
cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 },
|
|
1327
|
-
contextWindow: 200000,
|
|
1328
|
-
maxTokens: 64000,
|
|
1329
|
-
},
|
|
1330
|
-
{
|
|
1331
|
-
id: "claude-opus-4-5-thinking",
|
|
1332
|
-
name: "Claude Opus 4.5 Thinking (Antigravity)",
|
|
1333
|
-
api: "google-gemini-cli",
|
|
1334
|
-
provider: "google-antigravity",
|
|
1335
|
-
baseUrl: ANTIGRAVITY_ENDPOINT,
|
|
1336
|
-
reasoning: true,
|
|
1337
|
-
input: ["text", "image"],
|
|
1338
|
-
cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 },
|
|
1339
|
-
contextWindow: 200000,
|
|
1340
|
-
maxTokens: 64000,
|
|
1341
|
-
},
|
|
1342
|
-
{
|
|
1343
|
-
id: "claude-opus-4-6-thinking",
|
|
1344
|
-
name: "Claude Opus 4.6 Thinking (Antigravity)",
|
|
1345
|
-
api: "google-gemini-cli",
|
|
1346
|
-
provider: "google-antigravity",
|
|
1347
|
-
baseUrl: ANTIGRAVITY_ENDPOINT,
|
|
1348
|
-
reasoning: true,
|
|
1349
|
-
input: ["text", "image"],
|
|
1350
|
-
cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 },
|
|
1351
|
-
contextWindow: 200000,
|
|
1352
|
-
maxTokens: 128000,
|
|
1353
|
-
},
|
|
1354
|
-
{
|
|
1355
|
-
id: "claude-sonnet-4-6",
|
|
1356
|
-
name: "Claude Sonnet 4.6 (Antigravity)",
|
|
1357
|
-
api: "google-gemini-cli",
|
|
1358
|
-
provider: "google-antigravity",
|
|
1359
|
-
baseUrl: ANTIGRAVITY_ENDPOINT,
|
|
1360
|
-
reasoning: true,
|
|
1361
|
-
input: ["text", "image"],
|
|
1362
|
-
cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 },
|
|
1363
|
-
contextWindow: 200000,
|
|
1364
|
-
maxTokens: 64000,
|
|
1365
|
-
},
|
|
1366
|
-
{
|
|
1367
|
-
id: "gpt-oss-120b-medium",
|
|
1368
|
-
name: "GPT-OSS 120B Medium (Antigravity)",
|
|
1369
|
-
api: "google-gemini-cli",
|
|
1370
|
-
provider: "google-antigravity",
|
|
1371
|
-
baseUrl: ANTIGRAVITY_ENDPOINT,
|
|
1372
|
-
reasoning: false,
|
|
1373
|
-
input: ["text"],
|
|
1374
|
-
cost: { input: 0.09, output: 0.36, cacheRead: 0, cacheWrite: 0 },
|
|
1375
|
-
contextWindow: 131072,
|
|
1376
|
-
maxTokens: 32768,
|
|
1377
|
-
},
|
|
1378
|
-
];
|
|
1379
|
-
allModels.push(...antigravityModels);
|
|
1380
|
-
|
|
1381
|
-
const VERTEX_BASE_URL = "https://{location}-aiplatform.googleapis.com";
|
|
1382
|
-
const vertexModels: Model<"google-vertex">[] = [
|
|
1383
|
-
{
|
|
1384
|
-
id: "gemini-3-pro-preview",
|
|
1385
|
-
name: "Gemini 3 Pro Preview (Vertex)",
|
|
1386
|
-
api: "google-vertex",
|
|
1387
|
-
provider: "google-vertex",
|
|
1388
|
-
baseUrl: VERTEX_BASE_URL,
|
|
1389
|
-
reasoning: true,
|
|
1390
|
-
input: ["text", "image"],
|
|
1391
|
-
cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 0 },
|
|
1392
|
-
contextWindow: 1000000,
|
|
1393
|
-
maxTokens: 64000,
|
|
1394
|
-
},
|
|
1395
|
-
{
|
|
1396
|
-
id: "gemini-3.1-pro-preview",
|
|
1397
|
-
name: "Gemini 3.1 Pro Preview (Vertex)",
|
|
1398
|
-
api: "google-vertex",
|
|
1399
|
-
provider: "google-vertex",
|
|
1400
|
-
baseUrl: VERTEX_BASE_URL,
|
|
1401
|
-
reasoning: true,
|
|
1402
|
-
input: ["text", "image"],
|
|
1403
|
-
cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 0 },
|
|
1404
|
-
contextWindow: 1048576,
|
|
1405
|
-
maxTokens: 65536,
|
|
1406
|
-
},
|
|
1407
|
-
{
|
|
1408
|
-
id: "gemini-3.1-pro-preview-customtools",
|
|
1409
|
-
name: "Gemini 3.1 Pro Preview Custom Tools (Vertex)",
|
|
1410
|
-
api: "google-vertex",
|
|
1411
|
-
provider: "google-vertex",
|
|
1412
|
-
baseUrl: VERTEX_BASE_URL,
|
|
1413
|
-
reasoning: true,
|
|
1414
|
-
input: ["text", "image"],
|
|
1415
|
-
cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 0 },
|
|
1416
|
-
contextWindow: 1048576,
|
|
1417
|
-
maxTokens: 65536,
|
|
1418
|
-
},
|
|
1419
|
-
{
|
|
1420
|
-
id: "gemini-3-flash-preview",
|
|
1421
|
-
name: "Gemini 3 Flash Preview (Vertex)",
|
|
1422
|
-
api: "google-vertex",
|
|
1423
|
-
provider: "google-vertex",
|
|
1424
|
-
baseUrl: VERTEX_BASE_URL,
|
|
1425
|
-
reasoning: true,
|
|
1426
|
-
input: ["text", "image"],
|
|
1427
|
-
cost: { input: 0.5, output: 3, cacheRead: 0.05, cacheWrite: 0 },
|
|
1428
|
-
contextWindow: 1048576,
|
|
1429
|
-
maxTokens: 65536,
|
|
1430
|
-
},
|
|
1431
|
-
{
|
|
1432
|
-
id: "gemini-2.0-flash",
|
|
1433
|
-
name: "Gemini 2.0 Flash (Vertex)",
|
|
1434
|
-
api: "google-vertex",
|
|
1435
|
-
provider: "google-vertex",
|
|
1436
|
-
baseUrl: VERTEX_BASE_URL,
|
|
1437
|
-
reasoning: false,
|
|
1438
|
-
input: ["text", "image"],
|
|
1439
|
-
cost: { input: 0.15, output: 0.6, cacheRead: 0.0375, cacheWrite: 0 },
|
|
1440
|
-
contextWindow: 1048576,
|
|
1441
|
-
maxTokens: 8192,
|
|
1442
|
-
},
|
|
1443
|
-
{
|
|
1444
|
-
id: "gemini-2.0-flash-lite",
|
|
1445
|
-
name: "Gemini 2.0 Flash Lite (Vertex)",
|
|
1446
|
-
api: "google-vertex",
|
|
1447
|
-
provider: "google-vertex",
|
|
1448
|
-
baseUrl: VERTEX_BASE_URL,
|
|
1449
|
-
reasoning: true,
|
|
1450
|
-
input: ["text", "image"],
|
|
1451
|
-
cost: { input: 0.075, output: 0.3, cacheRead: 0.01875, cacheWrite: 0 },
|
|
1452
|
-
contextWindow: 1048576,
|
|
1453
|
-
maxTokens: 65536,
|
|
1454
|
-
},
|
|
1455
|
-
{
|
|
1456
|
-
id: "gemini-2.5-pro",
|
|
1457
|
-
name: "Gemini 2.5 Pro (Vertex)",
|
|
1458
|
-
api: "google-vertex",
|
|
1459
|
-
provider: "google-vertex",
|
|
1460
|
-
baseUrl: VERTEX_BASE_URL,
|
|
1461
|
-
reasoning: true,
|
|
1462
|
-
input: ["text", "image"],
|
|
1463
|
-
cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 },
|
|
1464
|
-
contextWindow: 1048576,
|
|
1465
|
-
maxTokens: 65536,
|
|
1466
|
-
},
|
|
1467
|
-
{
|
|
1468
|
-
id: "gemini-2.5-flash",
|
|
1469
|
-
name: "Gemini 2.5 Flash (Vertex)",
|
|
1470
|
-
api: "google-vertex",
|
|
1471
|
-
provider: "google-vertex",
|
|
1472
|
-
baseUrl: VERTEX_BASE_URL,
|
|
1473
|
-
reasoning: true,
|
|
1474
|
-
input: ["text", "image"],
|
|
1475
|
-
cost: { input: 0.3, output: 2.5, cacheRead: 0.03, cacheWrite: 0 },
|
|
1476
|
-
contextWindow: 1048576,
|
|
1477
|
-
maxTokens: 65536,
|
|
1478
|
-
},
|
|
1479
|
-
{
|
|
1480
|
-
id: "gemini-2.5-flash-lite-preview-09-2025",
|
|
1481
|
-
name: "Gemini 2.5 Flash Lite Preview 09-25 (Vertex)",
|
|
1482
|
-
api: "google-vertex",
|
|
1483
|
-
provider: "google-vertex",
|
|
1484
|
-
baseUrl: VERTEX_BASE_URL,
|
|
1485
|
-
reasoning: true,
|
|
1486
|
-
input: ["text", "image"],
|
|
1487
|
-
cost: { input: 0.1, output: 0.4, cacheRead: 0.01, cacheWrite: 0 },
|
|
1488
|
-
contextWindow: 1048576,
|
|
1489
|
-
maxTokens: 65536,
|
|
1490
|
-
},
|
|
1491
|
-
{
|
|
1492
|
-
id: "gemini-2.5-flash-lite",
|
|
1493
|
-
name: "Gemini 2.5 Flash Lite (Vertex)",
|
|
1494
|
-
api: "google-vertex",
|
|
1495
|
-
provider: "google-vertex",
|
|
1496
|
-
baseUrl: VERTEX_BASE_URL,
|
|
1497
|
-
reasoning: true,
|
|
1498
|
-
input: ["text", "image"],
|
|
1499
|
-
cost: { input: 0.1, output: 0.4, cacheRead: 0.01, cacheWrite: 0 },
|
|
1500
|
-
contextWindow: 1048576,
|
|
1501
|
-
maxTokens: 65536,
|
|
1502
|
-
},
|
|
1503
|
-
{
|
|
1504
|
-
id: "gemini-1.5-pro",
|
|
1505
|
-
name: "Gemini 1.5 Pro (Vertex)",
|
|
1506
|
-
api: "google-vertex",
|
|
1507
|
-
provider: "google-vertex",
|
|
1508
|
-
baseUrl: VERTEX_BASE_URL,
|
|
1509
|
-
reasoning: false,
|
|
1510
|
-
input: ["text", "image"],
|
|
1511
|
-
cost: { input: 1.25, output: 5, cacheRead: 0.3125, cacheWrite: 0 },
|
|
1512
|
-
contextWindow: 1000000,
|
|
1513
|
-
maxTokens: 8192,
|
|
1514
|
-
},
|
|
1515
|
-
{
|
|
1516
|
-
id: "gemini-1.5-flash",
|
|
1517
|
-
name: "Gemini 1.5 Flash (Vertex)",
|
|
1518
|
-
api: "google-vertex",
|
|
1519
|
-
provider: "google-vertex",
|
|
1520
|
-
baseUrl: VERTEX_BASE_URL,
|
|
1521
|
-
reasoning: false,
|
|
1522
|
-
input: ["text", "image"],
|
|
1523
|
-
cost: { input: 0.075, output: 0.3, cacheRead: 0.01875, cacheWrite: 0 },
|
|
1524
|
-
contextWindow: 1000000,
|
|
1525
|
-
maxTokens: 8192,
|
|
1526
|
-
},
|
|
1527
|
-
{
|
|
1528
|
-
id: "gemini-1.5-flash-8b",
|
|
1529
|
-
name: "Gemini 1.5 Flash-8B (Vertex)",
|
|
1530
|
-
api: "google-vertex",
|
|
1531
|
-
provider: "google-vertex",
|
|
1532
|
-
baseUrl: VERTEX_BASE_URL,
|
|
1533
|
-
reasoning: false,
|
|
1534
|
-
input: ["text", "image"],
|
|
1535
|
-
cost: { input: 0.0375, output: 0.15, cacheRead: 0.01, cacheWrite: 0 },
|
|
1536
|
-
contextWindow: 1000000,
|
|
1537
|
-
maxTokens: 8192,
|
|
1538
|
-
},
|
|
1539
|
-
];
|
|
1540
|
-
allModels.push(...vertexModels);
|
|
1541
|
-
|
|
1542
|
-
const azureOpenAiModels: Model<Api>[] = allModels
|
|
1543
|
-
.filter((model) => model.provider === "openai" && model.api === "openai-responses")
|
|
1544
|
-
.map((model) => ({
|
|
1545
|
-
...model,
|
|
1546
|
-
api: "azure-openai-responses",
|
|
1547
|
-
provider: "azure-openai-responses",
|
|
1548
|
-
baseUrl: "",
|
|
1549
|
-
}));
|
|
1550
|
-
allModels.push(...azureOpenAiModels);
|
|
1551
|
-
|
|
1552
|
-
// Group by provider and deduplicate by model ID
|
|
1553
|
-
const providers: Record<string, Record<string, Model<any>>> = {};
|
|
1554
|
-
for (const model of allModels) {
|
|
1555
|
-
if (!providers[model.provider]) {
|
|
1556
|
-
providers[model.provider] = {};
|
|
1557
|
-
}
|
|
1558
|
-
// Use model ID as key to automatically deduplicate
|
|
1559
|
-
// Only add if not already present (models.dev takes priority over OpenRouter)
|
|
1560
|
-
if (!providers[model.provider][model.id]) {
|
|
1561
|
-
providers[model.provider][model.id] = model;
|
|
1562
|
-
}
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
|
-
// Generate TypeScript file
|
|
1566
|
-
let output = `// This file is auto-generated by scripts/generate-models.ts
|
|
1567
|
-
// Do not edit manually - run 'npm run generate-models' to update
|
|
1568
|
-
|
|
1569
|
-
import type { Model } from "./types.js";
|
|
1570
|
-
|
|
1571
|
-
export const MODELS = {
|
|
1572
|
-
`;
|
|
1573
|
-
|
|
1574
|
-
// Generate provider sections (sorted for deterministic output)
|
|
1575
|
-
const sortedProviderIds = Object.keys(providers).sort();
|
|
1576
|
-
for (const providerId of sortedProviderIds) {
|
|
1577
|
-
const models = providers[providerId];
|
|
1578
|
-
output += `\t${JSON.stringify(providerId)}: {\n`;
|
|
1579
|
-
|
|
1580
|
-
const sortedModelIds = Object.keys(models).sort();
|
|
1581
|
-
for (const modelId of sortedModelIds) {
|
|
1582
|
-
const model = models[modelId];
|
|
1583
|
-
output += `\t\t"${model.id}": {\n`;
|
|
1584
|
-
output += `\t\t\tid: "${model.id}",\n`;
|
|
1585
|
-
output += `\t\t\tname: "${model.name}",\n`;
|
|
1586
|
-
output += `\t\t\tapi: "${model.api}",\n`;
|
|
1587
|
-
output += `\t\t\tprovider: "${model.provider}",\n`;
|
|
1588
|
-
if (model.baseUrl !== undefined) {
|
|
1589
|
-
output += `\t\t\tbaseUrl: "${model.baseUrl}",\n`;
|
|
1590
|
-
}
|
|
1591
|
-
if (model.headers) {
|
|
1592
|
-
output += `\t\t\theaders: ${JSON.stringify(model.headers)},\n`;
|
|
1593
|
-
}
|
|
1594
|
-
if (model.compat) {
|
|
1595
|
-
output += ` compat: ${JSON.stringify(model.compat)},
|
|
1596
|
-
`;
|
|
1597
|
-
}
|
|
1598
|
-
output += `\t\t\treasoning: ${model.reasoning},\n`;
|
|
1599
|
-
output += `\t\t\tinput: [${model.input.map(i => `"${i}"`).join(", ")}],\n`;
|
|
1600
|
-
output += `\t\t\tcost: {\n`;
|
|
1601
|
-
output += `\t\t\t\tinput: ${model.cost.input},\n`;
|
|
1602
|
-
output += `\t\t\t\toutput: ${model.cost.output},\n`;
|
|
1603
|
-
output += `\t\t\t\tcacheRead: ${model.cost.cacheRead},\n`;
|
|
1604
|
-
output += `\t\t\t\tcacheWrite: ${model.cost.cacheWrite},\n`;
|
|
1605
|
-
output += `\t\t\t},\n`;
|
|
1606
|
-
output += `\t\t\tcontextWindow: ${model.contextWindow},\n`;
|
|
1607
|
-
output += `\t\t\tmaxTokens: ${model.maxTokens},\n`;
|
|
1608
|
-
output += `\t\t} satisfies Model<"${model.api}">,\n`;
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
output += `\t},\n`;
|
|
1612
|
-
}
|
|
1613
|
-
|
|
1614
|
-
output += `} as const;
|
|
1615
|
-
`;
|
|
1616
|
-
|
|
1617
|
-
// Write file
|
|
1618
|
-
writeFileSync(join(packageRoot, "src/models.generated.ts"), output);
|
|
1619
|
-
console.log("Generated src/models.generated.ts");
|
|
1620
|
-
|
|
1621
|
-
// Print statistics
|
|
1622
|
-
const totalModels = allModels.length;
|
|
1623
|
-
const reasoningModels = allModels.filter(m => m.reasoning).length;
|
|
1624
|
-
|
|
1625
|
-
console.log(`\nModel Statistics:`);
|
|
1626
|
-
console.log(` Total tool-capable models: ${totalModels}`);
|
|
1627
|
-
console.log(` Reasoning-capable models: ${reasoningModels}`);
|
|
1628
|
-
|
|
1629
|
-
for (const [provider, models] of Object.entries(providers)) {
|
|
1630
|
-
console.log(` ${provider}: ${Object.keys(models).length} models`);
|
|
1631
|
-
}
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
// Run the generator
|
|
1635
|
-
generateModels().catch(console.error);
|