SOLO Coder通过higress网关对接自建大模型,出BUG

“{\“answer\”:null,\“api\”:\”-\“,\“chat_round\”:4,\“llm_first_token_duration\”:59,\“llm_service_duration\”:60,\“question\”:\”[map[text:\\n\\u003csystem-reminder\\u003e\\n\\n# Response Language Settings\\nYou MUST follow these language requirements when responding to the user:\\n- Always use the same language as the user’s latest message unless user explicitly asks.\\n- For code comments, follow the same language rule unless explicitly instructed otherwise\\n- Maintain consistency in language throughout the conversation\\n\\n\\u003c/system-reminder\\u003e\\n\\n type:text] map[text:\\u003csystem-reminder\\u003e\\nYou are in regular ** Agent ** Mode. Keep going until the user’s query is completely resolved and verified, before ending your turn and yielding back to the user.\\n\\u003c/system-reminder\\u003e\\n type:text] map[text:\\n\\u003cuser_input\\u003e\\n你好\\n\\u003c/user_input\\u003e\\n\\n\\u003csystem-reminder\\u003e\\n- Before starting any task, first review the Skill tool description to check if any skill in its \\u003cavailable_skills\\u003e is relevant to the \\u003cuser_input\\u003e intent. When a skill is relevant, you must invoke the Skill tool IMMEDIATELY as your first action.\\n\\u003c/system-reminder\\u003e\\n\\n\\n\\n type:text] map[text:\\n\\u003csystem-reminder\\u003e\\n\\n# Response Language Settings\\nYou MUST follow these language requirements when responding to the user:\\n- Always use the same language as the user’s latest message unless user explicitly asks.\\n- For code comments, follow the same language rule unless explicitly instructed otherwise\\n- Maintain consistency in language throughout the conversation\\n\\n\\u003c/system-reminder\\u003e\\n\\n type:text] map[text:\\u003csystem-reminder\\u003e\\nYou are in regular ** Agent ** Mode. Keep going until the user’s query is completely resolved and verified, before ending your turn and yielding back to the user.\\n\\u003c/system-reminder\\u003e\\n type:text] map[text:\\n\\u003cuser_input\\u003e\\n你好\\n\\u003c/user_input\\u003e\\n\\n\\u003csystem-reminder\\u003e\\n- Before starting any task, first review the Skill tool description to check if any skill in its \\u003cavailable_skills\\u003e is relevant to the \\u003cuser_input\\u003e intent. When a skill is relevant, you must invoke the Skill tool IMMEDIATELY as your first action.\\n\\u003c/system-reminder\\u003e\\n\\n\\n\\n type:text] map[text:\\n\\u003csystem-reminder\\u003e\\n\\n# Response Language Settings [truncated] rst action.\\n\\u003c/system-reminder\\u003e\\n\\n\\n\\n type:text] map[text:\\n\\u003csystem-reminder\\u003e\\n\\n# Response Language Settings\\nYou MUST follow these language requirements when responding to the user:\\n- Always use the same language as the user’s latest message unless user explicitly asks.\\n- For code comments, follow the same language rule unless explicitly instructed otherwise\\n- Maintain consistency in language throughout the conversation\\n\\n\\u003c/system-reminder\\u003e\\n\\n type:text] map[text:\\u003csystem-reminder\\u003e\\nYou are in regular ** Agent ** Mode. Keep going until the user’s query is completely resolved and verified, before ending your turn and yielding back to the user.\\n\\u003c/system-reminder\\u003e\\n type:text] map[text:\\n\\u003cuser_input\\u003e\\n哈哈哈哈\\n\\u003c/user_input\\u003e\\n\\n\\u003csystem-reminder\\u003e\\n- Before starting any task, first review the Skill tool description to check if any skill in its \\u003cavailable_skills\\u003e is relevant to the \\u003cuser_input\\u003e intent. When a skill is relevant, you must invoke the Skill tool IMMEDIATELY as your first action.\\n\\u003c/system-reminder\\u003e\\n\\n\\n\\n type:text] map[text:\\n\\u003csystem-reminder\\u003e\\n\\n# Response Language Settings\\nYou MUST follow these language requirements when responding to the user:\\n- Always use the same language as the user’s latest message unless user explicitly asks.\\n- For code comments, follow the same language rule unless explicitly instructed otherwise\\n- Maintain consistency in language throughout the conversation\\n\\n\\u003c/system-reminder\\u003e\\n\\n type:text] map[text:\\u003csystem-reminder\\u003e\\nYou are in regular ** Agent ** Mode. Keep going until the user’s query is completely resolved and verified, before ending your turn and yielding back to the user.\\n\\u003c/system-reminder\\u003e\\n type:text] map[text:\\n\\u003cuser_input\\u003e\\n哈哈哈哈\\n\\u003c/user_input\\u003e\\n\\n\\u003csystem-reminder\\u003e\\n- Before starting any task, first review the Skill tool description to check if any skill in its \\u003cavailable_skills\\u003e is relevant to the \\u003cuser_input\\u003e intent. When a skill is relevant, you must invoke the Skill tool IMMEDIATELY as your first action.\\n\\u003c/system-reminder\\u003e\\n\\n\\n\\n type:text]]\“,\“response_type\”:\“stream\”}”
这是higress网关返回的具体日志

1 个赞

看到你在尝试通过 Higress 网关对接自建大模型时遇到了问题。从日志来看,返回的内容似乎包含了很多系统提示词的重复循环,而不是正常的模型响应。

为了更好地帮你排查,我想先确认几个信息:

  1. 你是在 TRAE SOLO 桌面版配置的自定义模型吗?
  2. 你的 Higress 网关后面接的是哪个大模型服务?
  3. 直接调用 Higress 网关(不经过 SOLO)能正常返回结果吗?

另外也可以检查一下网关的响应格式是否符合 OpenAI 兼容接口的规范,这通常是这类问题的常见原因。

1 个赞