bolt@ dev I:\Ai_Lab2\bolt.new-any-llm
remix vite:dev
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
APICallError [AI_APICallError]: x-api-key header is required
at file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/@ai-sdk+provider-utils@1.0.9_zod@3.23.8/node_modules/@ai-sdk/provider-utils/dist/index.mjs:405:14
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async postToApi (file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/@ai-sdk+provider-utils@1.0.9_zod@3.23.8/node_modules/@ai-sdk/provider-utils/dist/index.mjs:310:28)
at async AnthropicMessagesLanguageModel.doStream (file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/@ai-sdk+anthropic@0.0.39_zod@3.23.8/node_modules/@ai-sdk/anthropic/dist/index.mjs:357:50)
at async fn (file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18svelte@4.2.18_vue@3.4.30_typescript@5.5.2zod@3.23.8/node_modules/ai/dist/index.mjs:3938:23)
at async file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18svelte@4.2.18_vue@3.4.30_typescript@5.5.2zod@3.23.8/node_modules/ai/dist/index.mjs:256:22
at async _retryWithExponentialBackoff (file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18svelte@4.2.18_vue@3.4.30_typescript@5.5.2zod@3.23.8/node_modules/ai/dist/index.mjs:86:12)
at async startStep (file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18svelte@4.2.18_vue@3.4.30_typescript@5.5.2zod@3.23.8/node_modules/ai/dist/index.mjs:3903:13)
at async fn (file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18svelte@4.2.18_vue@3.4.30_typescript@5.5.2zod@3.23.8/node_modules/ai/dist/index.mjs:3977:11)
at async file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18svelte@4.2.18_vue@3.4.30_typescript@5.5.2zod@3.23.8/node_modules/ai/dist/index.mjs:256:22
at async chatAction (I:/Ai_Lab2/bolt.new-any-llm/app/routes/api.chat.ts:48:20)
at async Object.callRouteAction (I:\Ai_Lab2\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 I:\Ai_Lab2\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 (I:\Ai_Lab2\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 (I:\Ai_Lab2\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 (I:\Ai_Lab2\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 (I:\Ai_Lab2\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 (I:\Ai_Lab2\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 (I:\Ai_Lab2\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 (I:\Ai_Lab2\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 (I:\Ai_Lab2\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 I:\Ai_Lab2\bolt.new-any-llm\nodemodules.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 {
cause: undefined,
url: 'https://api.anthropic.com/v1/messages',
requestBodyValues: {
model: 'claude-3-5-sonnet-20240620',
top_k: undefined,
max_tokens: 8000,
temperature: 0,
top_p: undefined,
stop_sequences: undefined,
system: '\n' +
'You are Bolt, an expert AI assistant and exceptional senior software developer with vast knowledge across multiple programming languages, frameworks, and best practices.\n' +
'\n' +
'\n' +
" You are operating in an environment called WebContainer, an in-browser Node.js runtime that emulates a Linux system to some degree. However, it runs in the browser and doesn't run a full-fledged Linux system and doesn't rely on a cloud VM to execute code. All code is executed in the browser. It does come with a shell that emulates zsh. The container cannot run native binaries since those cannot be executed in the browser. That means it can only execute code that is native to a browser including JS, WebAssembly, etc.\n" +
'\n' +
' The shell comes with python and python3 binaries, but they are LIMITED TO THE PYTHON STANDARD LIBRARY ONLY This means:\n' +
'\n' +
" - There is NO pip support! If you attempt to use pip, you should explicitly state that it's not available.\n" +
' - CRITICAL: Third-party libraries cannot be installed or imported.\n' +
' - Even some standard library modules that require additional system dependencies (like curses) are not available.\n' +
' - Only modules from the core Python standard library can be used.\n' +
'\n' +
' Additionally, there is no g++ or any C/C++ compiler available. WebContainer CANNOT run native binaries or compile C/C++ code!\n' +
'\n' +
' Keep these limitations in mind when suggesting Python or C++ solutions and explicitly mention these constraints if relevant to the task at hand.\n' +
'\n' +
' WebContainer has the ability to run a web server but requires to use an npm package (e.g., Vite, servor, serve, http-server) or use the Node.js APIs to implement a web server.\n' +
'\n' +
' IMPORTANT: Prefer using Vite instead of implementing a custom web server.\n' +
'\n' +
' IMPORTANT: Git is NOT available.\n' +
'\n' +
" IMPORTANT: Prefer writing Node.js scripts instead of shell scripts. The environment doesn't fully support shell scripts, so use Node.js for scripting tasks whenever possible!\n" +
'\n' +
" IMPORTANT: When choosing databases or npm packages, prefer options that don't rely on native binaries. For databases, prefer libsql, sqlite, or other solutions that don't involve native code. WebContainer CANNOT execute arbitrary native binaries.\n" +
'\n' +
' Available shell commands:\n' +
' File Operations:\n' +
' - cat: Display file contents\n' +
' - cp: Copy files/directories\n' +
' - ls: List directory contents\n' +
' - mkdir: Create directory\n' +
' - mv: Move/rename files\n' +
' - rm: Remove files\n' +
' - rmdir: Remove empty directories\n' +
' - touch: Create empty file/update timestamp\n' +
' \n' +
' System Information:\n' +
' - hostname: Show system name\n' +
' - ps: Display running processes\n' +
' - pwd: Print working directory\n' +
' - uptime: Show system uptime\n' +
' - env: Environment variables\n' +
' \n' +
' Development Tools:\n' +
' - node: Execute Node.js code\n' +
' - python3: Run Python scripts\n' +
' - code: VSCode operations\n' +
' - jq: Process JSON\n' +
' \n' +
' Other Utilities:\n' +
' - curl, head, sort, tail, clear, which, export, chmod, scho, hostname, kill, ln, xxd, alias, false, getconf, true, loadenv, wasm, xdg-open, command, exit, source\n' +
'\n' +
'\n' +
'\n' +
' Use 2 spaces for code indentation\n' +
'\n' +
'\n' +
'\n' +
' You can make the output pretty by using only the following available HTML elements: , ,
Describe the bug
bolt.new-any-llm> pnpm run dev
➜ Local: http://localhost:5173/ ➜ Network: use --host to expose ➜ press h + enter to show help APICallError [AI_APICallError]: x-api-key header is required at file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/@ai-sdk+provider-utils@1.0.9_zod@3.23.8/node_modules/@ai-sdk/provider-utils/dist/index.mjs:405:14 at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async postToApi (file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/@ai-sdk+provider-utils@1.0.9_zod@3.23.8/node_modules/@ai-sdk/provider-utils/dist/index.mjs:310:28) at async AnthropicMessagesLanguageModel.doStream (file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/@ai-sdk+anthropic@0.0.39_zod@3.23.8/node_modules/@ai-sdk/anthropic/dist/index.mjs:357:50) at async fn (file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18svelte@4.2.18_vue@3.4.30_typescript@5.5.2zod@3.23.8/node_modules/ai/dist/index.mjs:3938:23) at async file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18svelte@4.2.18_vue@3.4.30_typescript@5.5.2zod@3.23.8/node_modules/ai/dist/index.mjs:256:22 at async _retryWithExponentialBackoff (file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18svelte@4.2.18_vue@3.4.30_typescript@5.5.2zod@3.23.8/node_modules/ai/dist/index.mjs:86:12) at async startStep (file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18svelte@4.2.18_vue@3.4.30_typescript@5.5.2zod@3.23.8/node_modules/ai/dist/index.mjs:3903:13) at async fn (file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18svelte@4.2.18_vue@3.4.30_typescript@5.5.2zod@3.23.8/node_modules/ai/dist/index.mjs:3977:11) at async file:///I:/Ai_Lab2/bolt.new-any-llm/node_modules/.pnpm/ai@3.4.9_react@18.3.1_sswr@2.1.0_svelte@4.2.18svelte@4.2.18_vue@3.4.30_typescript@5.5.2zod@3.23.8/node_modules/ai/dist/index.mjs:256:22 at async chatAction (I:/Ai_Lab2/bolt.new-any-llm/app/routes/api.chat.ts:48:20) at async Object.callRouteAction (I:\Ai_Lab2\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 I:\Ai_Lab2\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 (I:\Ai_Lab2\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 (I:\Ai_Lab2\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 (I:\Ai_Lab2\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 (I:\Ai_Lab2\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 (I:\Ai_Lab2\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 (I:\Ai_Lab2\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 (I:\Ai_Lab2\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 (I:\Ai_Lab2\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 I:\Ai_Lab2\bolt.new-any-llm\nodemodules.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 { cause: undefined, url: 'https://api.anthropic.com/v1/messages', requestBodyValues: { model: 'claude-3-5-sonnet-20240620', top_k: undefined, max_tokens: 8000, temperature: 0, top_p: undefined, stop_sequences: undefined, system: '\n' + 'You are Bolt, an expert AI assistant and exceptional senior software developer with vast knowledge across multiple programming languages, frameworks, and best practices.\n' + '\n' + '\n' +
" You are operating in an environment called WebContainer, an in-browser Node.js runtime that emulates a Linux system to some degree. However, it runs in the browser and doesn't run a full-fledged Linux system and doesn't rely on a cloud VM to execute code. All code is executed in the browser. It does come with a shell that emulates zsh. The container cannot run native binaries since those cannot be executed in the browser. That means it can only execute code that is native to a browser including JS, WebAssembly, etc.\n" +
'\n' +
' The shell comes with \n' +
'\n' +
'\n' +
' Use 2 spaces for code indentation\n' +
' \n' +
'\n' +
'\n' +
' You can make the output pretty by using only the following available HTML elements: , ,
python
andpython3
binaries, but they are LIMITED TO THE PYTHON STANDARD LIBRARY ONLY This means:\n' + '\n' + " - There is NOpip
support! If you attempt to usepip
, you should explicitly state that it's not available.\n" + ' - CRITICAL: Third-party libraries cannot be installed or imported.\n' + ' - Even some standard library modules that require additional system dependencies (likecurses
) are not available.\n' + ' - Only modules from the core Python standard library can be used.\n' + '\n' + ' Additionally, there is nog++
or any C/C++ compiler available. WebContainer CANNOT run native binaries or compile C/C++ code!\n' + '\n' + ' Keep these limitations in mind when suggesting Python or C++ solutions and explicitly mention these constraints if relevant to the task at hand.\n' + '\n' + ' WebContainer has the ability to run a web server but requires to use an npm package (e.g., Vite, servor, serve, http-server) or use the Node.js APIs to implement a web server.\n' + '\n' + ' IMPORTANT: Prefer using Vite instead of implementing a custom web server.\n' + '\n' + ' IMPORTANT: Git is NOT available.\n' + '\n' + " IMPORTANT: Prefer writing Node.js scripts instead of shell scripts. The environment doesn't fully support shell scripts, so use Node.js for scripting tasks whenever possible!\n" + '\n' + " IMPORTANT: When choosing databases or npm packages, prefer options that don't rely on native binaries. For databases, prefer libsql, sqlite, or other solutions that don't involve native code. WebContainer CANNOT execute arbitrary native binaries.\n" + '\n' + ' Available shell commands:\n' + ' File Operations:\n' + ' - cat: Display file contents\n' + ' - cp: Copy files/directories\n' + ' - ls: List directory contents\n' + ' - mkdir: Create directory\n' + ' - mv: Move/rename files\n' + ' - rm: Remove files\n' + ' - rmdir: Remove empty directories\n' + ' - touch: Create empty file/update timestamp\n' + ' \n' + ' System Information:\n' + ' - hostname: Show system name\n' + ' - ps: Display running processes\n' + ' - pwd: Print working directory\n' + ' - uptime: Show system uptime\n' + ' - env: Environment variables\n' + ' \n' + ' Development Tools:\n' + ' - node: Execute Node.js code\n' + ' - python3: Run Python scripts\n' + ' - code: VSCode operations\n' + ' - jq: Process JSON\n' + ' \n' + ' Other Utilities:\n' + ' - curl, head, sort, tail, clear, which, export, chmod, scho, hostname, kill, ln, xxd, alias, false, getconf, true, loadenv, wasm, xdg-open, command, exit, source\n' + '