@psnext/slingcli 2.4.20260526-1 → 2.4.20260527-2
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/bin/sling.js +4 -1
- package/node_modules/@aws-sdk/core/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +12 -6
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js +12 -6
- package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-websocket/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +3 -3
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +1 -2
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +18 -24
- package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/cli.js +14 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +73 -58
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +8 -22
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +60 -40
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js +55 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js +45 -69
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +5 -2
- package/node_modules/@earendil-works/pi-ai/package.json +4 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/file-processor.js +2 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +18 -12
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.js +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +8 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +18 -24
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/index.js +8 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/template.js +6 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js +12 -29
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +5 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/output-guard.js +52 -22
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +63 -36
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.js +6 -20
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js +38 -31
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +9 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +32 -24
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +6 -13
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.js +8 -22
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +54 -53
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit-diff.js +8 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js +44 -81
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/file-mutation-queue.js +27 -12
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js +2 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js +3 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js +5 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/output-accumulator.js +9 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/path-utils.js +39 -21
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +9 -8
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/truncate.js +12 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js +20 -35
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +5 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/config-selector.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js +14 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +29 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/user-message.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +4 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js +37 -28
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js +64 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +15 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard-native.js +14 -8
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.js +124 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-worker.js +31 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.js +75 -115
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/paths.js +33 -7
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +13 -26
- package/node_modules/@earendil-works/pi-coding-agent/package.json +6 -6
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +40 -55
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js +2 -2
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +12 -2
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +53 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +4 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +38 -16
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +19 -12
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/package.json +3 -5
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/package.json +6 -6
- package/slingshot/index.js +246 -244
- package/node_modules/koffi/CHANGELOG.md +0 -1093
- package/node_modules/koffi/LICENSE.txt +0 -22
- package/node_modules/koffi/README.md +0 -43
- package/node_modules/koffi/build/koffi/darwin_arm64/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/darwin_x64/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/freebsd_arm64/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/freebsd_ia32/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/freebsd_x64/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/linux_arm64/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/linux_armhf/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/linux_ia32/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/linux_loong64/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/linux_riscv64d/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/linux_x64/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/musl_arm64/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/musl_x64/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/openbsd_ia32/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/openbsd_x64/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/win32_arm64/koffi.exp +0 -0
- package/node_modules/koffi/build/koffi/win32_arm64/koffi.lib +0 -0
- package/node_modules/koffi/build/koffi/win32_arm64/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/win32_ia32/koffi.exp +0 -0
- package/node_modules/koffi/build/koffi/win32_ia32/koffi.lib +0 -0
- package/node_modules/koffi/build/koffi/win32_ia32/koffi.node +0 -0
- package/node_modules/koffi/build/koffi/win32_x64/koffi.exp +0 -0
- package/node_modules/koffi/build/koffi/win32_x64/koffi.lib +0 -0
- package/node_modules/koffi/build/koffi/win32_x64/koffi.node +0 -0
- package/node_modules/koffi/doc/benchmarks.md +0 -126
- package/node_modules/koffi/doc/callbacks.md +0 -210
- package/node_modules/koffi/doc/contribute.md +0 -148
- package/node_modules/koffi/doc/functions.md +0 -250
- package/node_modules/koffi/doc/index.md +0 -61
- package/node_modules/koffi/doc/input.md +0 -471
- package/node_modules/koffi/doc/migration.md +0 -159
- package/node_modules/koffi/doc/misc.md +0 -180
- package/node_modules/koffi/doc/output.md +0 -305
- package/node_modules/koffi/doc/packaging.md +0 -88
- package/node_modules/koffi/doc/platforms.md +0 -36
- package/node_modules/koffi/doc/pointers.md +0 -328
- package/node_modules/koffi/doc/start.md +0 -118
- package/node_modules/koffi/doc/unions.md +0 -186
- package/node_modules/koffi/doc/variables.md +0 -102
- package/node_modules/koffi/index.d.ts +0 -288
- package/node_modules/koffi/index.js +0 -634
- package/node_modules/koffi/indirect.js +0 -533
- package/node_modules/koffi/lib/native/base/base.cc +0 -11015
- package/node_modules/koffi/lib/native/base/base.hh +0 -6003
- package/node_modules/koffi/lib/native/base/crc.inc +0 -2214
- package/node_modules/koffi/lib/native/base/crc_gen.py +0 -72
- package/node_modules/koffi/lib/native/base/mimetypes.inc +0 -1248
- package/node_modules/koffi/lib/native/base/mimetypes_gen.py +0 -58
- package/node_modules/koffi/lib/native/base/tower.cc +0 -821
- package/node_modules/koffi/lib/native/base/tower.hh +0 -81
- package/node_modules/koffi/lib/native/base/unicode.inc +0 -408
- package/node_modules/koffi/lib/native/base/unicode_gen.py +0 -152
- package/node_modules/koffi/package.json +0 -38
- package/node_modules/koffi/src/cnoke/LICENSE.txt +0 -22
- package/node_modules/koffi/src/cnoke/README.md +0 -99
- package/node_modules/koffi/src/cnoke/assets/FindCNoke.cmake +0 -127
- package/node_modules/koffi/src/cnoke/assets/toolchains.json +0 -126
- package/node_modules/koffi/src/cnoke/assets/win_delay_hook.c +0 -36
- package/node_modules/koffi/src/cnoke/cnoke.js +0 -170
- package/node_modules/koffi/src/cnoke/package.json +0 -24
- package/node_modules/koffi/src/cnoke/src/builder.js +0 -511
- package/node_modules/koffi/src/cnoke/src/index.js +0 -10
- package/node_modules/koffi/src/cnoke/src/tools.js +0 -407
- package/node_modules/koffi/src/koffi/CMakeLists.txt +0 -182
- package/node_modules/koffi/src/koffi/src/abi_arm32.cc +0 -1018
- package/node_modules/koffi/src/koffi/src/abi_arm32_asm.S +0 -169
- package/node_modules/koffi/src/koffi/src/abi_arm64.cc +0 -1295
- package/node_modules/koffi/src/koffi/src/abi_arm64_asm.S +0 -195
- package/node_modules/koffi/src/koffi/src/abi_arm64_asm.asm +0 -174
- package/node_modules/koffi/src/koffi/src/abi_loong64.cc +0 -5
- package/node_modules/koffi/src/koffi/src/abi_loong64_asm.S +0 -204
- package/node_modules/koffi/src/koffi/src/abi_riscv64.cc +0 -915
- package/node_modules/koffi/src/koffi/src/abi_riscv64_asm.S +0 -203
- package/node_modules/koffi/src/koffi/src/abi_x64_sysv.cc +0 -939
- package/node_modules/koffi/src/koffi/src/abi_x64_sysv_asm.S +0 -231
- package/node_modules/koffi/src/koffi/src/abi_x64_win.cc +0 -715
- package/node_modules/koffi/src/koffi/src/abi_x64_win_asm.S +0 -166
- package/node_modules/koffi/src/koffi/src/abi_x64_win_asm.asm +0 -192
- package/node_modules/koffi/src/koffi/src/abi_x86.cc +0 -860
- package/node_modules/koffi/src/koffi/src/abi_x86_asm.S +0 -193
- package/node_modules/koffi/src/koffi/src/abi_x86_asm.asm +0 -177
- package/node_modules/koffi/src/koffi/src/call.cc +0 -1326
- package/node_modules/koffi/src/koffi/src/call.hh +0 -179
- package/node_modules/koffi/src/koffi/src/errno.inc +0 -462
- package/node_modules/koffi/src/koffi/src/ffi.cc +0 -2702
- package/node_modules/koffi/src/koffi/src/ffi.hh +0 -354
- package/node_modules/koffi/src/koffi/src/init.js +0 -105
- package/node_modules/koffi/src/koffi/src/parser.cc +0 -220
- package/node_modules/koffi/src/koffi/src/parser.hh +0 -54
- package/node_modules/koffi/src/koffi/src/util.cc +0 -1807
- package/node_modules/koffi/src/koffi/src/util.hh +0 -221
- package/node_modules/koffi/src/koffi/src/uv.cc +0 -193
- package/node_modules/koffi/src/koffi/src/uv.def +0 -10
- package/node_modules/koffi/src/koffi/src/uv.hh +0 -40
- package/node_modules/koffi/src/koffi/src/win32.cc +0 -198
- package/node_modules/koffi/src/koffi/src/win32.hh +0 -119
- package/node_modules/koffi/src/koffi/tools/write_trampolines.js +0 -77
- package/node_modules/koffi/vendor/node-addon-api/LICENSE.md +0 -9
- package/node_modules/koffi/vendor/node-addon-api/README.md +0 -95
- package/node_modules/koffi/vendor/node-addon-api/napi-inl.deprecated.h +0 -186
- package/node_modules/koffi/vendor/node-addon-api/napi-inl.h +0 -7033
- package/node_modules/koffi/vendor/node-addon-api/napi.h +0 -3309
- package/node_modules/koffi/vendor/node-api-headers/LICENSE +0 -21
- package/node_modules/koffi/vendor/node-api-headers/README.md +0 -95
- package/node_modules/koffi/vendor/node-api-headers/def/js_native_api.def +0 -125
- package/node_modules/koffi/vendor/node-api-headers/def/node_api.def +0 -157
- package/node_modules/koffi/vendor/node-api-headers/include/js_native_api.h +0 -591
- package/node_modules/koffi/vendor/node-api-headers/include/js_native_api_types.h +0 -210
- package/node_modules/koffi/vendor/node-api-headers/include/node_api.h +0 -265
- package/node_modules/koffi/vendor/node-api-headers/include/node_api_types.h +0 -58
- package/node_modules/koffi/vendor/node-api-headers/include/uv/aix.h +0 -32
- package/node_modules/koffi/vendor/node-api-headers/include/uv/bsd.h +0 -34
- package/node_modules/koffi/vendor/node-api-headers/include/uv/darwin.h +0 -61
- package/node_modules/koffi/vendor/node-api-headers/include/uv/errno.h +0 -483
- package/node_modules/koffi/vendor/node-api-headers/include/uv/linux.h +0 -34
- package/node_modules/koffi/vendor/node-api-headers/include/uv/os390.h +0 -33
- package/node_modules/koffi/vendor/node-api-headers/include/uv/posix.h +0 -31
- package/node_modules/koffi/vendor/node-api-headers/include/uv/sunos.h +0 -44
- package/node_modules/koffi/vendor/node-api-headers/include/uv/threadpool.h +0 -37
- package/node_modules/koffi/vendor/node-api-headers/include/uv/tree.h +0 -521
- package/node_modules/koffi/vendor/node-api-headers/include/uv/unix.h +0 -512
- package/node_modules/koffi/vendor/node-api-headers/include/uv/version.h +0 -43
- package/node_modules/koffi/vendor/node-api-headers/include/uv/win.h +0 -698
- package/node_modules/koffi/vendor/node-api-headers/include/uv.h +0 -1990
|
@@ -1720,6 +1720,7 @@ export const MODELS = {
|
|
|
1720
1720
|
api: "anthropic-messages",
|
|
1721
1721
|
provider: "anthropic",
|
|
1722
1722
|
baseUrl: "https://api.anthropic.com",
|
|
1723
|
+
compat: { "forceAdaptiveThinking": true },
|
|
1723
1724
|
reasoning: true,
|
|
1724
1725
|
thinkingLevelMap: { "xhigh": "max" },
|
|
1725
1726
|
input: ["text", "image"],
|
|
@@ -1738,6 +1739,7 @@ export const MODELS = {
|
|
|
1738
1739
|
api: "anthropic-messages",
|
|
1739
1740
|
provider: "anthropic",
|
|
1740
1741
|
baseUrl: "https://api.anthropic.com",
|
|
1742
|
+
compat: { "forceAdaptiveThinking": true },
|
|
1741
1743
|
reasoning: true,
|
|
1742
1744
|
thinkingLevelMap: { "xhigh": "xhigh" },
|
|
1743
1745
|
input: ["text", "image"],
|
|
@@ -1824,6 +1826,7 @@ export const MODELS = {
|
|
|
1824
1826
|
api: "anthropic-messages",
|
|
1825
1827
|
provider: "anthropic",
|
|
1826
1828
|
baseUrl: "https://api.anthropic.com",
|
|
1829
|
+
compat: { "forceAdaptiveThinking": true },
|
|
1827
1830
|
reasoning: true,
|
|
1828
1831
|
input: ["text", "image"],
|
|
1829
1832
|
cost: {
|
|
@@ -1916,7 +1919,7 @@ export const MODELS = {
|
|
|
1916
1919
|
cost: {
|
|
1917
1920
|
input: 0.1,
|
|
1918
1921
|
output: 0.4,
|
|
1919
|
-
cacheRead: 0.
|
|
1922
|
+
cacheRead: 0.025,
|
|
1920
1923
|
cacheWrite: 0,
|
|
1921
1924
|
},
|
|
1922
1925
|
contextWindow: 1047576,
|
|
@@ -2001,7 +2004,7 @@ export const MODELS = {
|
|
|
2001
2004
|
cost: {
|
|
2002
2005
|
input: 0.15,
|
|
2003
2006
|
output: 0.6,
|
|
2004
|
-
cacheRead: 0.
|
|
2007
|
+
cacheRead: 0.075,
|
|
2005
2008
|
cacheWrite: 0,
|
|
2006
2009
|
},
|
|
2007
2010
|
contextWindow: 128000,
|
|
@@ -2127,7 +2130,7 @@ export const MODELS = {
|
|
|
2127
2130
|
cost: {
|
|
2128
2131
|
input: 1.25,
|
|
2129
2132
|
output: 10,
|
|
2130
|
-
cacheRead: 0.
|
|
2133
|
+
cacheRead: 0.125,
|
|
2131
2134
|
cacheWrite: 0,
|
|
2132
2135
|
},
|
|
2133
2136
|
contextWindow: 400000,
|
|
@@ -2552,7 +2555,7 @@ export const MODELS = {
|
|
|
2552
2555
|
cost: {
|
|
2553
2556
|
input: 1.1,
|
|
2554
2557
|
output: 4.4,
|
|
2555
|
-
cacheRead: 0.
|
|
2558
|
+
cacheRead: 0.275,
|
|
2556
2559
|
cacheWrite: 0,
|
|
2557
2560
|
},
|
|
2558
2561
|
contextWindow: 200000,
|
|
@@ -2823,6 +2826,7 @@ export const MODELS = {
|
|
|
2823
2826
|
api: "anthropic-messages",
|
|
2824
2827
|
provider: "cloudflare-ai-gateway",
|
|
2825
2828
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
2829
|
+
compat: { "forceAdaptiveThinking": true },
|
|
2826
2830
|
reasoning: true,
|
|
2827
2831
|
thinkingLevelMap: { "xhigh": "max" },
|
|
2828
2832
|
input: ["text", "image"],
|
|
@@ -2841,6 +2845,7 @@ export const MODELS = {
|
|
|
2841
2845
|
api: "anthropic-messages",
|
|
2842
2846
|
provider: "cloudflare-ai-gateway",
|
|
2843
2847
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
2848
|
+
compat: { "forceAdaptiveThinking": true },
|
|
2844
2849
|
reasoning: true,
|
|
2845
2850
|
thinkingLevelMap: { "xhigh": "xhigh" },
|
|
2846
2851
|
input: ["text", "image"],
|
|
@@ -2893,6 +2898,7 @@ export const MODELS = {
|
|
|
2893
2898
|
api: "anthropic-messages",
|
|
2894
2899
|
provider: "cloudflare-ai-gateway",
|
|
2895
2900
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
2901
|
+
compat: { "forceAdaptiveThinking": true },
|
|
2896
2902
|
reasoning: true,
|
|
2897
2903
|
input: ["text", "image"],
|
|
2898
2904
|
cost: {
|
|
@@ -3777,6 +3783,7 @@ export const MODELS = {
|
|
|
3777
3783
|
provider: "github-copilot",
|
|
3778
3784
|
baseUrl: "https://api.individual.githubcopilot.com",
|
|
3779
3785
|
headers: { "User-Agent": "GitHubCopilotChat/0.35.0", "Editor-Version": "vscode/1.107.0", "Editor-Plugin-Version": "copilot-chat/0.35.0", "Copilot-Integration-Id": "vscode-chat" },
|
|
3786
|
+
compat: { "forceAdaptiveThinking": true },
|
|
3780
3787
|
reasoning: true,
|
|
3781
3788
|
thinkingLevelMap: { "xhigh": "max" },
|
|
3782
3789
|
input: ["text", "image"],
|
|
@@ -3796,6 +3803,7 @@ export const MODELS = {
|
|
|
3796
3803
|
provider: "github-copilot",
|
|
3797
3804
|
baseUrl: "https://api.individual.githubcopilot.com",
|
|
3798
3805
|
headers: { "User-Agent": "GitHubCopilotChat/0.35.0", "Editor-Version": "vscode/1.107.0", "Editor-Plugin-Version": "copilot-chat/0.35.0", "Copilot-Integration-Id": "vscode-chat" },
|
|
3806
|
+
compat: { "forceAdaptiveThinking": true },
|
|
3799
3807
|
reasoning: true,
|
|
3800
3808
|
thinkingLevelMap: { "xhigh": "xhigh" },
|
|
3801
3809
|
input: ["text", "image"],
|
|
@@ -3834,6 +3842,7 @@ export const MODELS = {
|
|
|
3834
3842
|
provider: "github-copilot",
|
|
3835
3843
|
baseUrl: "https://api.individual.githubcopilot.com",
|
|
3836
3844
|
headers: { "User-Agent": "GitHubCopilotChat/0.35.0", "Editor-Version": "vscode/1.107.0", "Editor-Plugin-Version": "copilot-chat/0.35.0", "Copilot-Integration-Id": "vscode-chat" },
|
|
3845
|
+
compat: { "forceAdaptiveThinking": true },
|
|
3837
3846
|
reasoning: true,
|
|
3838
3847
|
input: ["text", "image"],
|
|
3839
3848
|
cost: {
|
|
@@ -6253,7 +6262,7 @@ export const MODELS = {
|
|
|
6253
6262
|
cost: {
|
|
6254
6263
|
input: 0.1,
|
|
6255
6264
|
output: 0.4,
|
|
6256
|
-
cacheRead: 0.
|
|
6265
|
+
cacheRead: 0.025,
|
|
6257
6266
|
cacheWrite: 0,
|
|
6258
6267
|
},
|
|
6259
6268
|
contextWindow: 1047576,
|
|
@@ -6338,7 +6347,7 @@ export const MODELS = {
|
|
|
6338
6347
|
cost: {
|
|
6339
6348
|
input: 0.15,
|
|
6340
6349
|
output: 0.6,
|
|
6341
|
-
cacheRead: 0.
|
|
6350
|
+
cacheRead: 0.075,
|
|
6342
6351
|
cacheWrite: 0,
|
|
6343
6352
|
},
|
|
6344
6353
|
contextWindow: 128000,
|
|
@@ -6464,7 +6473,7 @@ export const MODELS = {
|
|
|
6464
6473
|
cost: {
|
|
6465
6474
|
input: 1.25,
|
|
6466
6475
|
output: 10,
|
|
6467
|
-
cacheRead: 0.
|
|
6476
|
+
cacheRead: 0.125,
|
|
6468
6477
|
cacheWrite: 0,
|
|
6469
6478
|
},
|
|
6470
6479
|
contextWindow: 400000,
|
|
@@ -6889,7 +6898,7 @@ export const MODELS = {
|
|
|
6889
6898
|
cost: {
|
|
6890
6899
|
input: 1.1,
|
|
6891
6900
|
output: 4.4,
|
|
6892
|
-
cacheRead: 0.
|
|
6901
|
+
cacheRead: 0.275,
|
|
6893
6902
|
cacheWrite: 0,
|
|
6894
6903
|
},
|
|
6895
6904
|
contextWindow: 200000,
|
|
@@ -6965,7 +6974,7 @@ export const MODELS = {
|
|
|
6965
6974
|
cacheRead: 0.175,
|
|
6966
6975
|
cacheWrite: 0,
|
|
6967
6976
|
},
|
|
6968
|
-
contextWindow:
|
|
6977
|
+
contextWindow: 128000,
|
|
6969
6978
|
maxTokens: 128000,
|
|
6970
6979
|
},
|
|
6971
6980
|
"gpt-5.4": {
|
|
@@ -7098,6 +7107,7 @@ export const MODELS = {
|
|
|
7098
7107
|
api: "anthropic-messages",
|
|
7099
7108
|
provider: "opencode",
|
|
7100
7109
|
baseUrl: "https://opencode.ai/zen",
|
|
7110
|
+
compat: { "forceAdaptiveThinking": true },
|
|
7101
7111
|
reasoning: true,
|
|
7102
7112
|
thinkingLevelMap: { "xhigh": "max" },
|
|
7103
7113
|
input: ["text", "image"],
|
|
@@ -7116,6 +7126,7 @@ export const MODELS = {
|
|
|
7116
7126
|
api: "anthropic-messages",
|
|
7117
7127
|
provider: "opencode",
|
|
7118
7128
|
baseUrl: "https://opencode.ai/zen",
|
|
7129
|
+
compat: { "forceAdaptiveThinking": true },
|
|
7119
7130
|
reasoning: true,
|
|
7120
7131
|
thinkingLevelMap: { "xhigh": "xhigh" },
|
|
7121
7132
|
input: ["text", "image"],
|
|
@@ -7168,6 +7179,7 @@ export const MODELS = {
|
|
|
7168
7179
|
api: "anthropic-messages",
|
|
7169
7180
|
provider: "opencode",
|
|
7170
7181
|
baseUrl: "https://opencode.ai/zen",
|
|
7182
|
+
compat: { "forceAdaptiveThinking": true },
|
|
7171
7183
|
reasoning: true,
|
|
7172
7184
|
input: ["text", "image"],
|
|
7173
7185
|
cost: {
|
|
@@ -7922,6 +7934,23 @@ export const MODELS = {
|
|
|
7922
7934
|
contextWindow: 262144,
|
|
7923
7935
|
maxTokens: 65536,
|
|
7924
7936
|
},
|
|
7937
|
+
"qwen3.7-max": {
|
|
7938
|
+
id: "qwen3.7-max",
|
|
7939
|
+
name: "Qwen3.7 Max",
|
|
7940
|
+
api: "anthropic-messages",
|
|
7941
|
+
provider: "opencode-go",
|
|
7942
|
+
baseUrl: "https://opencode.ai/zen/go",
|
|
7943
|
+
reasoning: true,
|
|
7944
|
+
input: ["text"],
|
|
7945
|
+
cost: {
|
|
7946
|
+
input: 2.5,
|
|
7947
|
+
output: 7.5,
|
|
7948
|
+
cacheRead: 0.5,
|
|
7949
|
+
cacheWrite: 3.125,
|
|
7950
|
+
},
|
|
7951
|
+
contextWindow: 1000000,
|
|
7952
|
+
maxTokens: 65536,
|
|
7953
|
+
},
|
|
7925
7954
|
},
|
|
7926
7955
|
"openrouter": {
|
|
7927
7956
|
"ai21/jamba-large-1.7": {
|
|
@@ -8268,23 +8297,6 @@ export const MODELS = {
|
|
|
8268
8297
|
contextWindow: 262144,
|
|
8269
8298
|
maxTokens: 262144,
|
|
8270
8299
|
},
|
|
8271
|
-
"arcee-ai/trinity-large-thinking:free": {
|
|
8272
|
-
id: "arcee-ai/trinity-large-thinking:free",
|
|
8273
|
-
name: "Arcee AI: Trinity Large Thinking (free)",
|
|
8274
|
-
api: "openai-completions",
|
|
8275
|
-
provider: "openrouter",
|
|
8276
|
-
baseUrl: "https://openrouter.ai/api/v1",
|
|
8277
|
-
reasoning: true,
|
|
8278
|
-
input: ["text"],
|
|
8279
|
-
cost: {
|
|
8280
|
-
input: 0,
|
|
8281
|
-
output: 0,
|
|
8282
|
-
cacheRead: 0,
|
|
8283
|
-
cacheWrite: 0,
|
|
8284
|
-
},
|
|
8285
|
-
contextWindow: 262144,
|
|
8286
|
-
maxTokens: 80000,
|
|
8287
|
-
},
|
|
8288
8300
|
"arcee-ai/trinity-mini": {
|
|
8289
8301
|
id: "arcee-ai/trinity-mini",
|
|
8290
8302
|
name: "Arcee AI: Trinity Mini",
|
|
@@ -10987,8 +10999,8 @@ export const MODELS = {
|
|
|
10987
10999
|
cacheRead: 0,
|
|
10988
11000
|
cacheWrite: 0,
|
|
10989
11001
|
},
|
|
10990
|
-
contextWindow:
|
|
10991
|
-
maxTokens:
|
|
11002
|
+
contextWindow: 262144,
|
|
11003
|
+
maxTokens: 32768,
|
|
10992
11004
|
},
|
|
10993
11005
|
"poolside/laguna-xs.2:free": {
|
|
10994
11006
|
id: "poolside/laguna-xs.2:free",
|
|
@@ -11004,8 +11016,8 @@ export const MODELS = {
|
|
|
11004
11016
|
cacheRead: 0,
|
|
11005
11017
|
cacheWrite: 0,
|
|
11006
11018
|
},
|
|
11007
|
-
contextWindow:
|
|
11008
|
-
maxTokens:
|
|
11019
|
+
contextWindow: 262144,
|
|
11020
|
+
maxTokens: 32768,
|
|
11009
11021
|
},
|
|
11010
11022
|
"prime-intellect/intellect-3": {
|
|
11011
11023
|
id: "prime-intellect/intellect-3",
|
|
@@ -11087,7 +11099,7 @@ export const MODELS = {
|
|
|
11087
11099
|
input: 0.26,
|
|
11088
11100
|
output: 0.78,
|
|
11089
11101
|
cacheRead: 0,
|
|
11090
|
-
cacheWrite: 0
|
|
11102
|
+
cacheWrite: 0,
|
|
11091
11103
|
},
|
|
11092
11104
|
contextWindow: 1000000,
|
|
11093
11105
|
maxTokens: 32768,
|
|
@@ -11665,7 +11677,7 @@ export const MODELS = {
|
|
|
11665
11677
|
input: 0.065,
|
|
11666
11678
|
output: 0.26,
|
|
11667
11679
|
cacheRead: 0,
|
|
11668
|
-
cacheWrite: 0
|
|
11680
|
+
cacheWrite: 0,
|
|
11669
11681
|
},
|
|
11670
11682
|
contextWindow: 1000000,
|
|
11671
11683
|
maxTokens: 65536,
|
|
@@ -11682,7 +11694,7 @@ export const MODELS = {
|
|
|
11682
11694
|
input: 0.26,
|
|
11683
11695
|
output: 1.56,
|
|
11684
11696
|
cacheRead: 0,
|
|
11685
|
-
cacheWrite: 0
|
|
11697
|
+
cacheWrite: 0,
|
|
11686
11698
|
},
|
|
11687
11699
|
contextWindow: 1000000,
|
|
11688
11700
|
maxTokens: 65536,
|
|
@@ -11699,7 +11711,7 @@ export const MODELS = {
|
|
|
11699
11711
|
input: 0.3,
|
|
11700
11712
|
output: 1.7999999999999998,
|
|
11701
11713
|
cacheRead: 0,
|
|
11702
|
-
cacheWrite: 0,
|
|
11714
|
+
cacheWrite: 0.375,
|
|
11703
11715
|
},
|
|
11704
11716
|
contextWindow: 1000000,
|
|
11705
11717
|
maxTokens: 65536,
|
|
@@ -11713,13 +11725,13 @@ export const MODELS = {
|
|
|
11713
11725
|
reasoning: true,
|
|
11714
11726
|
input: ["text", "image"],
|
|
11715
11727
|
cost: {
|
|
11716
|
-
input: 0.
|
|
11728
|
+
input: 0.29,
|
|
11717
11729
|
output: 3.1999999999999997,
|
|
11718
11730
|
cacheRead: 0,
|
|
11719
11731
|
cacheWrite: 0,
|
|
11720
11732
|
},
|
|
11721
11733
|
contextWindow: 262144,
|
|
11722
|
-
maxTokens:
|
|
11734
|
+
maxTokens: 262140,
|
|
11723
11735
|
},
|
|
11724
11736
|
"qwen/qwen3.6-35b-a3b": {
|
|
11725
11737
|
id: "qwen/qwen3.6-35b-a3b",
|
|
@@ -11730,7 +11742,7 @@ export const MODELS = {
|
|
|
11730
11742
|
reasoning: true,
|
|
11731
11743
|
input: ["text", "image"],
|
|
11732
11744
|
cost: {
|
|
11733
|
-
input: 0.
|
|
11745
|
+
input: 0.14,
|
|
11734
11746
|
output: 1,
|
|
11735
11747
|
cacheRead: 0,
|
|
11736
11748
|
cacheWrite: 0,
|
|
@@ -11798,10 +11810,10 @@ export const MODELS = {
|
|
|
11798
11810
|
reasoning: true,
|
|
11799
11811
|
input: ["text"],
|
|
11800
11812
|
cost: {
|
|
11801
|
-
input:
|
|
11802
|
-
output:
|
|
11803
|
-
cacheRead: 0,
|
|
11804
|
-
cacheWrite:
|
|
11813
|
+
input: 1.25,
|
|
11814
|
+
output: 3.75,
|
|
11815
|
+
cacheRead: 0.25,
|
|
11816
|
+
cacheWrite: 1.5625,
|
|
11805
11817
|
},
|
|
11806
11818
|
contextWindow: 1000000,
|
|
11807
11819
|
maxTokens: 65536,
|
|
@@ -12070,9 +12082,9 @@ export const MODELS = {
|
|
|
12070
12082
|
reasoning: true,
|
|
12071
12083
|
input: ["text", "image"],
|
|
12072
12084
|
cost: {
|
|
12073
|
-
input: 0.
|
|
12074
|
-
output:
|
|
12075
|
-
cacheRead: 0.
|
|
12085
|
+
input: 0.14,
|
|
12086
|
+
output: 0.28,
|
|
12087
|
+
cacheRead: 0.0028,
|
|
12076
12088
|
cacheWrite: 0,
|
|
12077
12089
|
},
|
|
12078
12090
|
contextWindow: 1048576,
|
|
@@ -12087,13 +12099,13 @@ export const MODELS = {
|
|
|
12087
12099
|
reasoning: true,
|
|
12088
12100
|
input: ["text"],
|
|
12089
12101
|
cost: {
|
|
12090
|
-
input:
|
|
12091
|
-
output:
|
|
12092
|
-
cacheRead: 0.
|
|
12102
|
+
input: 0.435,
|
|
12103
|
+
output: 0.87,
|
|
12104
|
+
cacheRead: 0.0036,
|
|
12093
12105
|
cacheWrite: 0,
|
|
12094
12106
|
},
|
|
12095
12107
|
contextWindow: 1048576,
|
|
12096
|
-
maxTokens:
|
|
12108
|
+
maxTokens: 131072,
|
|
12097
12109
|
},
|
|
12098
12110
|
"z-ai/glm-4-32b": {
|
|
12099
12111
|
id: "z-ai/glm-4-32b",
|
|
@@ -12138,13 +12150,13 @@ export const MODELS = {
|
|
|
12138
12150
|
reasoning: true,
|
|
12139
12151
|
input: ["text"],
|
|
12140
12152
|
cost: {
|
|
12141
|
-
input: 0.
|
|
12142
|
-
output: 0.
|
|
12143
|
-
cacheRead: 0
|
|
12153
|
+
input: 0.125,
|
|
12154
|
+
output: 0.84,
|
|
12155
|
+
cacheRead: 0,
|
|
12144
12156
|
cacheWrite: 0,
|
|
12145
12157
|
},
|
|
12146
12158
|
contextWindow: 131072,
|
|
12147
|
-
maxTokens:
|
|
12159
|
+
maxTokens: 131070,
|
|
12148
12160
|
},
|
|
12149
12161
|
"z-ai/glm-4.5-air:free": {
|
|
12150
12162
|
id: "z-ai/glm-4.5-air:free",
|
|
@@ -13226,6 +13238,7 @@ export const MODELS = {
|
|
|
13226
13238
|
api: "anthropic-messages",
|
|
13227
13239
|
provider: "vercel-ai-gateway",
|
|
13228
13240
|
baseUrl: "https://ai-gateway.vercel.sh",
|
|
13241
|
+
compat: { "forceAdaptiveThinking": true },
|
|
13229
13242
|
reasoning: true,
|
|
13230
13243
|
thinkingLevelMap: { "xhigh": "max" },
|
|
13231
13244
|
input: ["text", "image"],
|
|
@@ -13244,6 +13257,7 @@ export const MODELS = {
|
|
|
13244
13257
|
api: "anthropic-messages",
|
|
13245
13258
|
provider: "vercel-ai-gateway",
|
|
13246
13259
|
baseUrl: "https://ai-gateway.vercel.sh",
|
|
13260
|
+
compat: { "forceAdaptiveThinking": true },
|
|
13247
13261
|
reasoning: true,
|
|
13248
13262
|
thinkingLevelMap: { "xhigh": "xhigh" },
|
|
13249
13263
|
input: ["text", "image"],
|
|
@@ -13296,6 +13310,7 @@ export const MODELS = {
|
|
|
13296
13310
|
api: "anthropic-messages",
|
|
13297
13311
|
provider: "vercel-ai-gateway",
|
|
13298
13312
|
baseUrl: "https://ai-gateway.vercel.sh",
|
|
13313
|
+
compat: { "forceAdaptiveThinking": true },
|
|
13299
13314
|
reasoning: true,
|
|
13300
13315
|
input: ["text", "image"],
|
|
13301
13316
|
cost: {
|
|
@@ -15249,9 +15264,9 @@ export const MODELS = {
|
|
|
15249
15264
|
reasoning: true,
|
|
15250
15265
|
input: ["text", "image"],
|
|
15251
15266
|
cost: {
|
|
15252
|
-
input: 0.
|
|
15253
|
-
output:
|
|
15254
|
-
cacheRead: 0.
|
|
15267
|
+
input: 0.14,
|
|
15268
|
+
output: 0.28,
|
|
15269
|
+
cacheRead: 0.0028,
|
|
15255
15270
|
cacheWrite: 0,
|
|
15256
15271
|
},
|
|
15257
15272
|
contextWindow: 1050000,
|
|
@@ -15266,9 +15281,9 @@ export const MODELS = {
|
|
|
15266
15281
|
reasoning: true,
|
|
15267
15282
|
input: ["text", "image"],
|
|
15268
15283
|
cost: {
|
|
15269
|
-
input:
|
|
15270
|
-
output:
|
|
15271
|
-
cacheRead: 0.
|
|
15284
|
+
input: 0.435,
|
|
15285
|
+
output: 0.87,
|
|
15286
|
+
cacheRead: 0.0036,
|
|
15272
15287
|
cacheWrite: 0,
|
|
15273
15288
|
},
|
|
15274
15289
|
contextWindow: 1050000,
|
|
@@ -90,12 +90,13 @@ export const streamBedrock = (model, context, options = {}) => {
|
|
|
90
90
|
try {
|
|
91
91
|
const client = new BedrockRuntimeClient(config);
|
|
92
92
|
const cacheRetention = resolveCacheRetention(options.cacheRetention);
|
|
93
|
+
const inferenceMaxTokens = options.maxTokens ?? (isAnthropicClaudeModel(model) ? model.maxTokens : undefined);
|
|
93
94
|
let commandInput = {
|
|
94
95
|
modelId: model.id,
|
|
95
96
|
messages: convertMessages(context, model, cacheRetention),
|
|
96
97
|
system: buildSystemPrompt(context.systemPrompt, model, cacheRetention),
|
|
97
98
|
inferenceConfig: {
|
|
98
|
-
...(
|
|
99
|
+
...(inferenceMaxTokens !== undefined && { maxTokens: inferenceMaxTokens }),
|
|
99
100
|
...(options.temperature !== undefined && { temperature: options.temperature }),
|
|
100
101
|
},
|
|
101
102
|
toolConfig: convertToolConfig(context.tools, options.toolChoice),
|
|
@@ -329,7 +329,7 @@ export const streamAnthropic = (model, context, options) => {
|
|
|
329
329
|
const requestOptions = {
|
|
330
330
|
...(options?.signal ? { signal: options.signal } : {}),
|
|
331
331
|
...(options?.timeoutMs !== undefined ? { timeout: options.timeoutMs } : {}),
|
|
332
|
-
|
|
332
|
+
maxRetries: options?.maxRetries ?? 0,
|
|
333
333
|
};
|
|
334
334
|
const response = await client.messages.create({ ...params, stream: true }, requestOptions).asResponse();
|
|
335
335
|
await options?.onResponse?.({ status: response.status, headers: headersToRecord(response.headers) }, model);
|
|
@@ -527,18 +527,6 @@ export const streamAnthropic = (model, context, options) => {
|
|
|
527
527
|
})();
|
|
528
528
|
return stream;
|
|
529
529
|
};
|
|
530
|
-
/**
|
|
531
|
-
* Check if a model supports adaptive thinking (Opus 4.6+, Sonnet 4.6)
|
|
532
|
-
*/
|
|
533
|
-
function supportsAdaptiveThinking(modelId) {
|
|
534
|
-
// Adaptive-thinking model IDs (with or without date suffix)
|
|
535
|
-
return (modelId.includes("opus-4-6") ||
|
|
536
|
-
modelId.includes("opus-4.6") ||
|
|
537
|
-
modelId.includes("opus-4-7") ||
|
|
538
|
-
modelId.includes("opus-4.7") ||
|
|
539
|
-
modelId.includes("sonnet-4-6") ||
|
|
540
|
-
modelId.includes("sonnet-4.6"));
|
|
541
|
-
}
|
|
542
530
|
/**
|
|
543
531
|
* Map ThinkingLevel to Anthropic effort levels for adaptive thinking.
|
|
544
532
|
* Note: effort "max" is only valid on Opus 4.6, while Opus 4.7 supports "xhigh".
|
|
@@ -568,9 +556,9 @@ export const streamSimpleAnthropic = (model, context, options) => {
|
|
|
568
556
|
if (!options?.reasoning) {
|
|
569
557
|
return streamAnthropic(model, context, { ...base, thinkingEnabled: false });
|
|
570
558
|
}
|
|
571
|
-
// For
|
|
572
|
-
// For older models: use budget-based thinking
|
|
573
|
-
if (
|
|
559
|
+
// For models with adaptive thinking: use an effort level.
|
|
560
|
+
// For older models: use budget-based thinking.
|
|
561
|
+
if (model.compat?.forceAdaptiveThinking === true) {
|
|
574
562
|
const effort = mapThinkingLevelToEffort(model, options.reasoning);
|
|
575
563
|
return streamAnthropic(model, context, {
|
|
576
564
|
...base,
|
|
@@ -592,9 +580,8 @@ function isOAuthToken(apiKey) {
|
|
|
592
580
|
return apiKey.includes("sk-ant-oat");
|
|
593
581
|
}
|
|
594
582
|
function createClient(model, apiKey, interleavedThinking, useFineGrainedToolStreamingBeta, optionsHeaders, dynamicHeaders, sessionId) {
|
|
595
|
-
// Adaptive thinking models
|
|
596
|
-
|
|
597
|
-
const needsInterleavedBeta = interleavedThinking && !supportsAdaptiveThinking(model.id);
|
|
583
|
+
// Adaptive thinking models have interleaved thinking built in, so skip the beta header.
|
|
584
|
+
const needsInterleavedBeta = interleavedThinking && model.compat?.forceAdaptiveThinking !== true;
|
|
598
585
|
const betaFeatures = [];
|
|
599
586
|
if (useFineGrainedToolStreamingBeta) {
|
|
600
587
|
betaFeatures.push(FINE_GRAINED_TOOL_STREAMING_BETA);
|
|
@@ -709,14 +696,13 @@ function buildParams(model, context, isOAuthToken, options) {
|
|
|
709
696
|
const compat = getAnthropicCompat(model);
|
|
710
697
|
params.tools = convertTools(context.tools, isOAuthToken, compat.supportsEagerToolInputStreaming, compat.supportsCacheControlOnTools ? cacheControl : undefined);
|
|
711
698
|
}
|
|
712
|
-
// Configure thinking mode: adaptive
|
|
713
|
-
// budget-based (older models), or explicitly disabled.
|
|
699
|
+
// Configure thinking mode: adaptive, budget-based, or explicitly disabled.
|
|
714
700
|
if (model.reasoning) {
|
|
715
701
|
if (options?.thinkingEnabled) {
|
|
716
702
|
// Default to "summarized" so Opus 4.7 and Mythos Preview behave like
|
|
717
703
|
// older Claude 4 models (whose API default is also "summarized").
|
|
718
704
|
const display = options.thinkingDisplay ?? "summarized";
|
|
719
|
-
if (
|
|
705
|
+
if (model.compat?.forceAdaptiveThinking === true) {
|
|
720
706
|
// Adaptive thinking: Claude decides when and how much to think.
|
|
721
707
|
params.thinking = { type: "adaptive", display };
|
|
722
708
|
if (options.effort) {
|
|
@@ -83,7 +83,7 @@ export const streamAzureOpenAIResponses = (model, context, options) => {
|
|
|
83
83
|
const requestOptions = {
|
|
84
84
|
...(options?.signal ? { signal: options.signal } : {}),
|
|
85
85
|
...(options?.timeoutMs !== undefined ? { timeout: options.timeoutMs } : {}),
|
|
86
|
-
|
|
86
|
+
maxRetries: options?.maxRetries ?? 0,
|
|
87
87
|
};
|
|
88
88
|
const { data: openaiStream, response } = await client.responses.create(params, requestOptions).withResponse();
|
|
89
89
|
await options?.onResponse?.({ status: response.status, headers: headersToRecord(response.headers) }, model);
|
|
@@ -25,7 +25,7 @@ export const generateImagesOpenRouter = async (model, context, options) => {
|
|
|
25
25
|
const requestOptions = {
|
|
26
26
|
...(options?.signal ? { signal: options.signal } : {}),
|
|
27
27
|
...(options?.timeoutMs !== undefined ? { timeout: options.timeoutMs } : {}),
|
|
28
|
-
|
|
28
|
+
maxRetries: options?.maxRetries ?? 0,
|
|
29
29
|
};
|
|
30
30
|
const { data: response, response: rawResponse } = await client.chat.completions
|
|
31
31
|
.create(params, requestOptions)
|