错误信息: Insufficient Balance 堆栈信息: AI_APICallError: Insufficient Balance at file:/...

2025年10月16日 16:17 响应: 4.64秒 状态: success

🚨 错误信息

错误名称: AI_APICallError 错误信息: Insufficient Balance 堆栈信息: AI_APICallError: Insufficient Balance at file:///D:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/dist-BF36PYi7.js:4456:11 at async postToApi (file:///D:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/dist-BF36PYi7.js:4352:24) at async OpenAICompatibleChatLanguageModel.doStream (file:///D:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-8K9fs3H5.js:48824:48) at async fn (file:///D:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-8K9fs3H5.js:39880:17) at async file:///D:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-8K9fs3H5.js:37282:19 at async _retryWithExponentialBackoff (file:///D:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-8K9fs3H5.js:37384:10) at async streamStep (file:///D:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-8K9fs3H5.js:39848:108) at async fn (file:///D:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-8K9fs3H5.js:40127:5) at async file:///D:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-8K9fs3H5.js:37282:19 错误原因: "[undefined]" 状态码: 402 请求路径: https://api.deepseek.com/v1/chat/completions 请求体: { "model": "deepseek-chat", "user": "[undefined]", "max_tokens": "[undefined]", "temperature": 1, "top_p": 1, "frequency_penalty": "[undefined]", "presence_penalty": "[undefined]", "response_format": "[undefined]", "stop": "[undefined]", "seed": "[undefined]", "serviceTier": "[undefined]", "reasoning_effort": "[undefined]", "messages": [ { "role": "system", "content": "In this environment you have access to a set of tools you can use to answer the user's question. \\\nYou can use one tool per message, and will receive the result of that tool use in the user's response. You use tools step-by-step to accomplish a given task, with each tool use informed by the result of the previous tool use.\n\n## Tool Use Formatting\n\nTool use is formatted using XML-style tags. The tool name is enclosed in opening and closing tags, and each parameter is similarly enclosed within its own set of tags. Here's the structure:\n\n<tool_use>\n <name>{tool_name}</name>\n <arguments>{json_arguments}</arguments>\n</tool_use>\n\nThe tool name should be the exact name of the tool you are using, and the arguments should be a JSON object containing the parameters required by that tool. For example:\n<tool_use>\n <name>python_interpreter</name>\n <arguments>{\"code\": \"5 + 3 + 1294.678\"}</arguments>\n</tool_use>\n\nThe user will respond with the result of the tool use, which should be formatted as follows:\n\n<tool_use_result>\n <name>{tool_name}</name>\n <result>{result}</result>\n</tool_use_result>\n\nThe result should be a string, which can represent a file or any other output type. You can use this result as input for the next action.\nFor example, if the result of the tool use is an image file, you can use it in the next action like this:\n\n<tool_use>\n <name>image_transformer</name>\n <arguments>{\"image\": \"image_1.jpg\"}</arguments>\n</tool_use>\n\nAlways adhere to this format for the tool use to ensure proper parsing and execution.\n\n## Tool Use Examples\n\nHere are a few examples using notional tools:\n---\nUser: Generate an image of the oldest person in this document.\n\nA: I can use the document_qa tool to find out who the oldest person is in the document.\n<tool_use>\n <name>document_qa</name>\n <arguments>{\"document\": \"document.pdf\", \"question\": \"Who is the oldest person mentioned?\"}</arguments>\n</tool_use>\n\nUser: <tool_use_result>\n <name>document_qa</name>\n <result>John Doe, a 55 year old lumberjack living in Newfoundland.</result>\n</tool_use_result>\n\nA: I can use the image_generator tool to create a portrait of John Doe.\n<tool_use>\n <name>image_generator</name>\n <arguments>{\"prompt\": \"A portrait of John Doe, a 55-year-old man living in Canada.\"}</arguments>\n</tool_use>\n\nUser: <tool_use_result>\n <name>image_generator</name>\n <result>image.png</result>\n</tool_use_result>\n\nA: the image is generated as image.png\n\n---\nUser: \"What is the result of the following operation: 5 + 3 + 1294.678?\"\n\nA: I can use the python_interpreter tool to calculate the result of the operation.\n<tool_use>\n <name>python_interpreter</name>\n <arguments>{\"code\": \"5 + 3 + 1294.678\"}</arguments>\n</tool_use>\n\nUser: <tool_use_result>\n <name>python_interpreter</name>\n <result>1302.678</result>\n</tool_use_result>\n\nA: The result of the operation is 1302.678.\n\n---\nUser: \"Which city has the highest population , Guangzhou or Shanghai?\"\n\nA: I can use the search tool to find the population of Guangzhou.\n<tool_use>\n <name>search</name>\n <arguments>{\"query\": \"Population Guangzhou\"}</arguments>\n</tool_use>\n\nUser: <tool_use_result>\n <name>search</name>\n <result>Guangzhou has a population of 15 million inhabitants as of 2021.</result>\n</tool_use_result>\n\nA: I can use the search tool to find the population of Shanghai.\n<tool_use>\n <name>search</name>\n <arguments>{\"query\": \"Population Shanghai\"}</arguments>\n</tool_use>\n\nUser: <tool_use_result>\n <name>search</name>\n <result>26 million (2019)</result>\n</tool_use_result>\nAssistant: The population of Shanghai is 26 million, while Guangzhou has a population of 15 million. Therefore, Shanghai has the highest population.\n\n## Tool Use Available Tools\nAbove example were using notional tools that might not exist for you. You only have access to these tools:\n<tools>\n\n<tool>\n <name>builtin_web_search</name>\n <description>Web search tool for finding current information, news, and real-time data from the internet.\n\nThis tool has been configured with search parameters based on the conversation context:\n- Prepared queries: \"hi\n\"\n\nYou can use this tool as-is to search with the prepared queries, or provide additionalContext to refine or replace the search terms.</description>\n <arguments>\n {\"~standard\":{\"vendor\":\"zod\",\"version\":1},\"def\":{\"type\":\"object\",\"shape\":{\"additionalContext\":{\"~standard\":{\"vendor\":\"zod\",\"version\":1},\"def\":{\"type\":\"optional\",\"innerType\":{\"~standard\":{\"vendor\":\"zod\",\"version\":1},\"def\":{\"type\":\"string\"},\"type\":\"string\",\"format\":null,\"minLength\":null,\"maxLength\":null}},\"type\":\"optional\"}}},\"type\":\"object\"}\n </arguments>\n</tool>\n\n</tools>\n\n## Tool Use Rules\nHere are the rules you should always follow to solve your task:\n1. Always use the right arguments for the tools. Never use variable names as the action arguments, use the value instead.\n2. Call a tool only when needed: do not call the search agent if you do not need information, try to solve the task yourself.\n3. If no tool call is needed, just answer the question directly.\n4. Never re-do a tool call that you previously did with the exact same parameters.\n5. For tool use, MAKE SURE use XML tag format as shown in the examples above. Do not use any other format.\n\n# User Instructions\n\n\nNow Begin! If you solve the task correctly, you will receive a reward of $1,000,000." }, { "role": "user", "content": "hi" } ], "tools": "[undefined]", "tool_choice": "[undefined]", "stream": true, "stream_options": "[undefined]" } 响应首部: { "access-control-allow-credentials": "true", "cf-cache-status": "DYNAMIC", "cf-ray": "98f619330c56534e-LOS", "content-length": "111", "content-type": "application/json", "date": "Thu, 16 Oct 2025 08:13:42 GMT", "document-policy": "include-js-call-stacks-in-crash-reports", "server": "cloudflare", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "vary": "origin, access-control-request-method, access-control-request-headers", "x-content-type-options": "nosniff", "x-ds-trace-id": "d68e1d831ddc7da8cd68902e84b97eff" } 响应内容: { "error": { "message": "Insufficient Balance", "type": "unknown_error", "param": null, "code": "invalid_request_error" } } 数据: { "error": { "message": "Insufficient Balance", "type": "unknown_error", "param": null, "code": "invalid_request_error" } }

🤖 AI解决方案

  • 错误翻译
  •     {
          "error": {
            "message": "Insufficient Balance",
            "type": "unknown_error",
            "param": null,
            "code": "invalid_request_error"
          }
        }
        
    核心关键句翻译: "余额不足"

  • 原因分析

  • API调用失败,原因为您的账户余额不足以支付此次请求。

  • 解决方案

  • 请检查您的DMXAPI账户余额,并根据需要进行充值。

  • 预防措施

* 在进行API调用前,始终检查账户余额。
* 设置账户余额预警,当余额低于某个阈值时及时通知。