chore: update ollama ai provider

This commit is contained in:
Vyacheslav Scherbinin
2025-08-20 00:58:39 +07:00
parent 623fc26de5
commit 88c8fe4614
4 changed files with 87 additions and 118 deletions
+2 -2
View File
@@ -91,7 +91,8 @@
"@xterm/addon-clipboard": "0.1.0",
"@xterm/xterm": "^5.5.0",
"adm-zip": "^0.5.16",
"ai": "^4.3.16",
"ai": "^5.0.17",
"ai-sdk-ollama": "^0.5.1",
"bcrypt": "5.1.1",
"better-auth": "v1.2.8-beta.7",
"bl": "6.0.11",
@@ -124,7 +125,6 @@
"node-schedule": "2.1.1",
"nodemailer": "6.9.14",
"octokit": "3.1.2",
"ollama-ai-provider": "^1.2.0",
"otpauth": "^9.4.0",
"pino": "9.4.0",
"pino-pretty": "11.2.2",
+2 -2
View File
@@ -44,7 +44,8 @@
"@react-email/components": "^0.0.21",
"@trpc/server": "^10.45.2",
"adm-zip": "^0.5.16",
"ai": "^4.3.16",
"ai": "^5.0.17",
"ai-sdk-ollama": "^0.5.1",
"bcrypt": "5.1.1",
"better-auth": "v1.2.8-beta.7",
"bl": "6.0.11",
@@ -65,7 +66,6 @@
"node-schedule": "2.1.1",
"nodemailer": "6.9.14",
"octokit": "3.1.2",
"ollama-ai-provider": "^1.2.0",
"otpauth": "^9.4.0",
"pino": "9.4.0",
"pino-pretty": "11.2.2",
@@ -5,7 +5,7 @@ import { createDeepInfra } from "@ai-sdk/deepinfra";
import { createMistral } from "@ai-sdk/mistral";
import { createOpenAI } from "@ai-sdk/openai";
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { createOllama } from "ollama-ai-provider";
import { createOllama } from "ai-sdk-ollama";
export function getProviderName(apiUrl: string) {
if (apiUrl.includes("api.openai.com")) return "openai";
@@ -59,7 +59,7 @@ export function selectAIProvider(config: { apiUrl: string; apiKey: string }) {
case "ollama":
return createOllama({
// optional settings, e.g.
baseURL: `${config.apiUrl}/api`,
baseURL: config.apiUrl,
});
case "deepinfra":
return createDeepInfra({
+81 -112
View File
@@ -263,8 +263,11 @@ importers:
specifier: ^0.5.16
version: 0.5.16
ai:
specifier: ^4.3.16
version: 4.3.16([email protected])([email protected])
specifier: ^5.0.17
version: 5.0.17([email protected])
ai-sdk-ollama:
specifier: ^0.5.1
version: 0.5.1([email protected])
bcrypt:
specifier: 5.1.1
version: 5.1.1
@@ -361,9 +364,6 @@ importers:
octokit:
specifier: 3.1.2
version: 3.1.2
ollama-ai-provider:
specifier: ^1.2.0
version: 1.2.0([email protected])
otpauth:
specifier: ^9.4.0
version: 9.4.0
@@ -643,8 +643,11 @@ importers:
specifier: ^0.5.16
version: 0.5.16
ai:
specifier: ^4.3.16
version: 4.3.16([email protected])([email protected])
specifier: ^5.0.17
version: 5.0.17([email protected])
ai-sdk-ollama:
specifier: ^0.5.1
version: 0.5.1([email protected])
bcrypt:
specifier: 5.1.1
version: 5.1.1
@@ -705,9 +708,6 @@ importers:
octokit:
specifier: 3.1.2
version: 3.1.2
ollama-ai-provider:
specifier: ^1.2.0
version: 1.2.0([email protected])
otpauth:
specifier: ^9.4.0
version: 9.4.0
@@ -847,6 +847,12 @@ packages:
peerDependencies:
zod: ^3.0.0
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-yiHYz0bAHEvhL+fSUBI2dNmyj0LOI8zw5qrYpa4gp1ojPgZq/7T1WXoIWRmVdjQwvT4PzSmRKLtbMPfz+umgfw==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.25.76 || ^4
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-lv857D9UJqCVxiq2Fcu7mSPTypEHBUqLl1K+lCaP6X/7QAkcaxI36QDONG+tOhGHJOXTsS114u8lrUTaEiGXbg==}
engines: {node: '>=18'}
@@ -880,6 +886,12 @@ packages:
peerDependencies:
zod: ^3.23.8
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-/3Z6lfUp8r+ewFd9yzHkCmPlMOJUXup2Sx3aoUyrdXLhOmAfHRl6Z4lDbIdV0uvw/QYoBcVLJnvXN7ncYeS3uQ==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.25.76 || ^4
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-WiuJEpHTrltOIzv3x2wx4gwksAHW0h6nK3SoDzjqCOJLu/2OJ1yASESTIX+f07ChFykHElVoP80Ol/fe9dw6tQ==}
engines: {node: '>=18'}
@@ -888,21 +900,9 @@ packages:
resolution: {integrity: sha512-qZMxYJ0qqX/RfnuIaab+zp8UAeJn/ygXXAffR5I4N0n1IrvA6qBsjc8hXLmBiMV2zoXlifkacF7sEFnYnjBcqg==}
engines: {node: '>=18'}
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-jK1IZZ22evPZoQW3vlkZ7wvjYGYF+tRBKXtrcolduIkQ/m/sOAVcVeVDUDvh1T91xCnWCdUGCPZg2avZ90mv3g==}
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-6o7Y2SeO9vFKB8lArHXehNuusnpddKPk7xqL7T2/b+OvXMRIXUO1rR4wcv1hAFUAT9avGZshty3Wlua/XA7TvA==}
engines: {node: '>=18'}
peerDependencies:
react: ^18 || ^19 || ^19.0.0-rc
zod: ^3.23.8
peerDependenciesMeta:
zod:
optional: true
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-3zcwCc8ezzFlwp3ZD15wAPjf2Au4s3vAbKsXQVyhxODHcmu0iyPO2Eua6D/vicq/AUm/BAo60r97O6HU+EI0+w==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.23.8
'@alloc/[email protected]':
resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==}
@@ -3716,6 +3716,9 @@ packages:
resolution: {integrity: sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==}
engines: {node: '>=14.16'}
'@standard-schema/[email protected]':
resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==}
'@stepperize/[email protected]':
resolution: {integrity: sha512-LAOcfi3d2mM/Jn740Xy35qsuTwmoLIuitvWZTZRURYeGsc7a6sIKAkk3+L1joZGkLFvf5q4I6V7LxWWfB5hDvg==}
peerDependencies:
@@ -3958,9 +3961,6 @@ packages:
'@types/[email protected]':
resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==}
'@types/[email protected]':
resolution: {integrity: sha512-xFdR6tkm0MWvBfO8xXCSsinYxHcqkQUlcHeSpMC2ukzOb6lwQAfDmW+Qt0AvlGd8HpsS28qKsB+oPeJn9I39jg==}
'@types/[email protected]':
resolution: {integrity: sha512-yKpAGEuKRSS8wwx0joknWxsmLha78wNMe9R2S3UNsVOkZded8UqOrV8KoeDXoXsjndxwyF3eIhyClGbO1SEhEg==}
@@ -4201,15 +4201,15 @@ packages:
resolution: {integrity: sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==}
engines: {node: '>=12'}
ai@4.3.16:
resolution: {integrity: sha512-KUDwlThJ5tr2Vw0A1ZkbDKNME3wzWhuVfAOwIvFUzl1TPVDFAXDFTXio3p+jaKneB+dKNCvFFlolYmmgHttG1g==}
ai[email protected].1:
resolution: {integrity: sha512-VPE2yagxtowepiPROaP/7YUpiZxqZO4SDHHM2Tdw0wyatPCggct142eQI34UO2/PPJ1iXKpraWI5+n0/pcz69Q==}
engines: {node: '>=22'}
[email protected]:
resolution: {integrity: sha512-DLZikqZZJdwSkRhFikw6Mt7pUmPZ7Ue38TjdOcw2U6iZtBbuiyWGIhHyJXlUpLcZrtBE5yqPTozyZri1lRjduw==}
engines: {node: '>=18'}
peerDependencies:
react: ^18 || ^19 || ^19.0.0-rc
zod: ^3.23.8
peerDependenciesMeta:
react:
optional: true
zod: ^3.25.76 || ^4
[email protected]:
resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==}
@@ -4846,9 +4846,6 @@ packages:
[email protected]:
resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==}
[email protected]:
resolution: {integrity: sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==}
[email protected]:
resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
@@ -5139,6 +5136,10 @@ packages:
resolution: {integrity: sha512-6RxOBZ/cYgd8usLwsEl+EC09Au/9BcmCKYF2/xbml6DNczf7nv0MQb+7BA2F+li6//I+28VNlQR37XfQtcAJuA==}
engines: {node: '>=18.0.0'}
[email protected]:
resolution: {integrity: sha512-bSRG85ZrMdmWtm7qkF9He9TNRzc/Bm99gEJMaQoHJ9E6Kv9QBbsldh2oMj7iXmYNEAVvNgvv5vPorG6W+XtBhQ==}
engines: {node: '>=20.0.0'}
[email protected]:
resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==}
engines: {node: '>=16.17'}
@@ -5730,11 +5731,6 @@ packages:
[email protected]:
resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==}
[email protected]:
resolution: {integrity: sha512-3QItJOXp2AP1uv7waBkao5nCvhEv+QmJAd38Ybq7wNI74Q+BBmnLn4EDKz6yI9xGAIQoUF87qHt+kc1IVxB4zQ==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
[email protected]:
resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==}
engines: {'0': node >= 0.2.0}
@@ -6395,14 +6391,8 @@ packages:
resolution: {integrity: sha512-MG5qmrTL5y8KYwFgE1A4JWmgfQBaIETE/lOlfwNYx1QOtCQHGVxkRJmdUJltFc1HVn73d61TlMhMyNTOtMl+ng==}
engines: {node: '>= 18'}
ollama[email protected]:
resolution: {integrity: sha512-jTNFruwe3O/ruJeppI/quoOUxG7NA6blG3ZyQj3lei4+NnJo7bi3eIRWqlVpRlu/mbzbFXeJSBuYQWF6pzGKww==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.0.0
peerDependenciesMeta:
zod:
optional: true
ollama@0.5.17:
resolution: {integrity: sha512-q5LmPtk6GLFouS+3aURIVl+qcAOPC4+Msmx7uBb3pd+fxI55WnGjmLZ0yijI/CYy79x0QPGx3BwC3u5zv9fBvQ==}
on-[email protected]:
resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==}
@@ -6485,9 +6475,6 @@ packages:
resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==}
engines: {node: '>= 0.8'}
[email protected]:
resolution: {integrity: sha512-Njv/59hHaokb/hRUjce3Hdv12wd60MtM9Z5Olmn+nehe0QDAsRtRbJPvJ0Z91TusF0SuZRIvnM+S4l6EIP8leA==}
[email protected]:
resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}
engines: {node: '>=8'}
@@ -7349,11 +7336,6 @@ packages:
react: '>=16.8.0 <19'
react-dom: '>=16.8.0 <19'
[email protected]:
resolution: {integrity: sha512-dshNvs3ExOqtZ6kJBaAsabhPdHyeY4P2cKwRCniDVifBMoG/SVI7tfLWqPXriVspf2Rg4tPzXJTnwaihIeFw2A==}
peerDependencies:
react: ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
[email protected]:
resolution: {integrity: sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==}
engines: {node: '>=0.10.0'}
@@ -7414,10 +7396,6 @@ packages:
[email protected]:
resolution: {integrity: sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==}
[email protected]:
resolution: {integrity: sha512-nt6AMGKW1p/70DF/hGBdJB57B8Tspmbp5gfJ8ilhLnt7kkr2ye7hzD6NVG8GGErk2HWF34igrL2CXmNIkzKqKw==}
engines: {node: '>=18'}
[email protected]:
resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
@@ -7735,6 +7713,9 @@ packages:
[email protected]:
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
[email protected]:
resolution: {integrity: sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==}
[email protected]:
resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
@@ -7899,6 +7880,12 @@ snapshots:
'@ai-sdk/provider-utils': 2.0.5([email protected])
zod: 3.25.32
'@ai-sdk/[email protected]([email protected])':
dependencies:
'@ai-sdk/provider': 2.0.0
'@ai-sdk/provider-utils': 3.0.4([email protected])
zod: 3.25.32
'@ai-sdk/[email protected]([email protected])':
dependencies:
'@ai-sdk/provider': 1.1.3
@@ -7933,6 +7920,14 @@ snapshots:
secure-json-parse: 2.7.0
zod: 3.25.32
'@ai-sdk/[email protected]([email protected])':
dependencies:
'@ai-sdk/provider': 2.0.0
'@standard-schema/spec': 1.0.0
eventsource-parser: 3.0.5
zod: 3.25.32
zod-to-json-schema: 3.24.5([email protected])
'@ai-sdk/[email protected]':
dependencies:
json-schema: 0.4.0
@@ -7941,22 +7936,9 @@ snapshots:
dependencies:
json-schema: 0.4.0
'@ai-sdk/[email protected]([email protected])([email protected])':
'@ai-sdk/[email protected]':
dependencies:
'@ai-sdk/provider-utils': 2.2.8([email protected])
'@ai-sdk/ui-utils': 1.2.11([email protected])
react: 18.2.0
swr: 2.3.3([email protected])
throttleit: 2.1.0
optionalDependencies:
zod: 3.25.32
'@ai-sdk/[email protected]([email protected])':
dependencies:
'@ai-sdk/provider': 1.1.3
'@ai-sdk/provider-utils': 2.2.8([email protected])
zod: 3.25.32
zod-to-json-schema: 3.24.5([email protected])
json-schema: 0.4.0
'@alloc/[email protected]': {}
@@ -10767,6 +10749,8 @@ snapshots:
'@sindresorhus/[email protected]': {}
'@standard-schema/[email protected]': {}
'@stepperize/[email protected]([email protected]([email protected]))([email protected])':
dependencies:
react: 18.2.0
@@ -11257,8 +11241,6 @@ snapshots:
dependencies:
'@types/ms': 2.1.0
'@types/[email protected]': {}
'@types/[email protected]':
dependencies:
'@types/node': 20.17.51
@@ -11347,7 +11329,7 @@ snapshots:
'@types/[email protected]':
dependencies:
'@types/node': 20.17.51
'@types/node': 18.19.104
pg-protocol: 1.10.3
pg-types: 2.2.0
@@ -11534,17 +11516,22 @@ snapshots:
clean-stack: 4.2.0
indent-string: 5.0.0
ai@4.3.16([email protected])([email protected]):
ai[email protected]([email protected]):
dependencies:
'@ai-sdk/provider': 1.1.3
'@ai-sdk/provider-utils': 2.2.8([email protected])
'@ai-sdk/react': 1.2.12([email protected])([email protected])
'@ai-sdk/ui-utils': 1.2.11([email protected])
'@ai-sdk/provider': 2.0.0
'@ai-sdk/provider-utils': 3.0.4([email protected])
ai: 5.0.17([email protected])
ollama: 0.5.17
transitivePeerDependencies:
- zod
[email protected]([email protected]):
dependencies:
'@ai-sdk/gateway': 1.0.8([email protected])
'@ai-sdk/provider': 2.0.0
'@ai-sdk/provider-utils': 3.0.4([email protected])
'@opentelemetry/api': 1.9.0
jsondiffpatch: 0.6.0
zod: 3.25.32
optionalDependencies:
react: 18.2.0
[email protected]:
dependencies:
@@ -12181,8 +12168,6 @@ snapshots:
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]: {}
@@ -12471,6 +12456,8 @@ snapshots:
[email protected]: {}
[email protected]: {}
[email protected]:
dependencies:
cross-spawn: 7.0.6
@@ -13088,12 +13075,6 @@ snapshots:
[email protected]: {}
[email protected]:
dependencies:
'@types/diff-match-patch': 1.0.36
chalk: 5.4.1
diff-match-patch: 1.0.5
[email protected]: {}
[email protected]:
@@ -13895,13 +13876,9 @@ snapshots:
'@octokit/request-error': 5.1.1
'@octokit/types': 12.6.0
ollama[email protected]([email protected]):
ollama@0.5.17:
dependencies:
'@ai-sdk/provider': 1.1.3
'@ai-sdk/provider-utils': 2.2.8([email protected])
partial-json: 0.1.7
optionalDependencies:
zod: 3.25.32
whatwg-fetch: 3.6.20
[email protected]: {}
@@ -13994,8 +13971,6 @@ snapshots:
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]: {}
@@ -14957,12 +14932,6 @@ snapshots:
- '@types/react'
- debug
[email protected]([email protected]):
dependencies:
dequal: 2.0.3
react: 18.2.0
use-sync-external-store: 1.5.0([email protected])
[email protected]: {}
[email protected]: {}
@@ -15054,8 +15023,6 @@ snapshots:
dependencies:
real-require: 0.2.0
[email protected]: {}
[email protected]: {}
[email protected]: {}
@@ -15359,6 +15326,8 @@ snapshots:
[email protected]: {}
[email protected]: {}
[email protected]:
dependencies:
tr46: 0.0.3