Hi I’m lost mainly with free models I have this error :
can you help me ?
(node:91453) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
APICallError [AI_APICallError]: Unauthorized
at file:///Users/antoine/Desktop/Code%20Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/@ai-sdk+provider-utils@1.0.2_zod@3.23.8/node_modules/@ai-sdk/provider-utils/dist/index.mjs:430:14
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async postToApi (file:///Users/antoine/Desktop/Code%20Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/@ai-sdk+provider-utils@1.0.2_zod@3.23.8/node_modules/@ai-sdk/provider-utils/dist/index.mjs:321:28)
at async OpenRouterChatLanguageModel.doStream (file:///Users/antoine/Desktop/Code%20Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/@openrouter+ai-sdk-provider@0.0.5_zod@3.23.8/node_modules/@openrouter/ai-sdk-provider/dist/index.mjs:309:50)
at async fn (file:///Users/antoine/Desktop/Code%20Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18__svelte@4.2.18_vue@3.4.30_typescript@5.5.2__zod@3.23.8/node_modules/ai/dist/index.mjs:3938:23)
at async file:///Users/antoine/Desktop/Code%20Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18__svelte@4.2.18_vue@3.4.30_typescript@5.5.2__zod@3.23.8/node_modules/ai/dist/index.mjs:256:22
at async _retryWithExponentialBackoff (file:///Users/antoine/Desktop/Code%20Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18__svelte@4.2.18_vue@3.4.30_typescript@5.5.2__zod@3.23.8/node_modules/ai/dist/index.mjs:86:12)
at async startStep (file:///Users/antoine/Desktop/Code%20Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18__svelte@4.2.18_vue@3.4.30_typescript@5.5.2__zod@3.23.8/node_modules/ai/dist/index.mjs:3903:13)
at async fn (file:///Users/antoine/Desktop/Code%20Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18__svelte@4.2.18_vue@3.4.30_typescript@5.5.2__zod@3.23.8/node_modules/ai/dist/index.mjs:3977:11)
at async file:///Users/antoine/Desktop/Code%20Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18__svelte@4.2.18_vue@3.4.30_typescript@5.5.2__zod@3.23.8/node_modules/ai/dist/index.mjs:256:22
at async chatAction (eval at instantiateModule (file:///Users/antoine/Desktop/Code%20Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/vite@5.3.1_@types+node@20.14.9_sass@1.77.6/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:53398:24), <anonymous>:64:20)
at async Object.callRouteAction (/Users/antoine/Desktop/Code Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/@remix-run+server-runtime@2.10.0_typescript@5.5.2/node_modules/@remix-run/server-runtime/dist/data.js:37:16)
at async /Users/antoine/Desktop/Code Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/@remix-run+router@1.17.0/node_modules/@remix-run/router/dist/router.cjs.js:4612:21
at async callLoaderOrAction (/Users/antoine/Desktop/Code Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/@remix-run+router@1.17.0/node_modules/@remix-run/router/dist/router.cjs.js:4677:16)
at async Promise.all (index 1)
at async callDataStrategyImpl (/Users/antoine/Desktop/Code Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/@remix-run+router@1.17.0/node_modules/@remix-run/router/dist/router.cjs.js:4552:17)
at async callDataStrategy (/Users/antoine/Desktop/Code Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/@remix-run+router@1.17.0/node_modules/@remix-run/router/dist/router.cjs.js:4041:19)
at async submit (/Users/antoine/Desktop/Code Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/@remix-run+router@1.17.0/node_modules/@remix-run/router/dist/router.cjs.js:3900:21)
at async queryImpl (/Users/antoine/Desktop/Code Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/@remix-run+router@1.17.0/node_modules/@remix-run/router/dist/router.cjs.js:3858:22)
at async Object.queryRoute (/Users/antoine/Desktop/Code Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/@remix-run+router@1.17.0/node_modules/@remix-run/router/dist/router.cjs.js:3827:18)
at async handleResourceRequest (/Users/antoine/Desktop/Code Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/@remix-run+server-runtime@2.10.0_typescript@5.5.2/node_modules/@remix-run/server-runtime/dist/server.js:413:20)
at async requestHandler (/Users/antoine/Desktop/Code Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/@remix-run+server-runtime@2.10.0_typescript@5.5.2/node_modules/@remix-run/server-runtime/dist/server.js:156:18)
at async /Users/antoine/Desktop/Code Tests/bolt_any_llm/bolt.new-any-llm/node_modules/.pnpm/@remix-run+dev@2.10.0_@remix-run+react@2.10.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_typ_qwyxqdhnwp3srgtibfrlais3ge/node_modules/@remix-run/dev/dist/vite/cloudflare-proxy-plugin.js:70:25 {
url: 'https://openrouter.ai/api/v1/chat/completions',
requestBodyValues: {
model: 'meta-llama/llama-3.2-1b-instruct:free',
logit_bias: undefined,
logprobs: undefined,
top_logprobs: undefined,
user: undefined,
parallel_tool_calls: undefined,
max_tokens: 8000,
temperature: 0,
top_p: undefined,
frequency_penalty: undefined,
presence_penalty: undefined,
seed: undefined,
messages: [
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object]
],
tools: undefined,
tool_choice: undefined,
stream: true,
stream_options: undefined
},
statusCode: 401,
responseHeaders: {
'access-control-allow-origin': '*',
'cf-placement': 'local-',
'cf-ray': '8e74a7539e2ded17-MXP',
connection: 'keep-alive',
'content-length': '54',
'content-type': 'application/json; charset=UTF-8',
date: 'Sat, 23 Nov 2024 22:39:09 GMT',
server: 'cloudflare',
vary: 'Accept-Encoding',
'x-clerk-auth-message': 'Invalid JWT form. A JWT consists of three parts separated by dots. (reason=token-invalid, token-carrier=header)',
'x-clerk-auth-reason': 'token-invalid',
'x-clerk-auth-status': 'signed-out'
},
responseBody: '{"error":{"message":"Invalid credentials","code":401}}',
cause: undefined,
isRetryable: false,
data: undefined
}