{"record":{"id":"8a95a10ce07c9b63","repo":"iflytek/astron-agent","slug":"1-base","errorCode":"-1","errorMessage":"璇锋眰鏈嶅姟瓒呮椂","messagePattern":"璇锋眰鏈嶅姟瓒呮椂","errorType":"error_code","errorClass":"PluginExc","httpStatus":null,"severity":"error","filePath":"core/agent/domain/models/base.py","lineNumber":187,"sourceCode":"                raise\n            # Some older OpenAI-compatible providers reject stream_options.\n            # A 400/422 validation response arrives before the SDK opens an SSE\n            # stream, so no client-visible output has been emitted. Cache the\n            # capability to avoid repeating the rejected request.\n            self._stream_usage_supported = False\n            request_kwargs.pop(\"stream_options\", None)\n            return await self.llm.chat.completions.create(**request_kwargs)\n\n    def _log_messages_to_span(self, sp: Span, messages: list) -> None:\n        for message in messages:\n            sp.add_info_events({message.get(\"role\"): message.get(\"content\")})\n\n    def _log_request_info_to_span(self, sp: Span, stream: bool) -> None:\n        sp.add_info_events({\"model\": self.name})\n        sp.add_info_events({\"stream\": stream})\n\n    def _handle_api_timeout_error(self, error: APITimeoutError) -> None:\n        raise PluginExc(-1, \"璇锋眰鏈嶅姟瓒呮椂\", om=str(error)) from error\n\n    def _handle_api_error(self, error: APIError, sp: Optional[Span]) -> None:\n        if sp is not None:\n            sp.add_info_events({\"code\": error.code or \"null\"})\n            sp.add_info_events({\"message\": error.message})\n            sp.add_info_events(\n                {\"converted-code\": str(getattr(error, \"code\", \"unknown\"))}\n            )\n            sp.add_info_events({\"converted-message\": error.message})\n        llm_plugin_error(error.code, error.message)\n\n    def _handle_general_error(self, error: Exception, sp: Optional[Span]) -> None:\n        if sp is not None:\n            sp.add_info_events({\"code\": \"\"})\n            sp.add_info_events({\"message\": str(error)})\n            sp.add_info_events({\"converted-code\": \"-1\"})\n            sp.add_info_events({\"converted-message\": str(error)})\n        llm_plugin_error(\"-1\", str(error))","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/core/agent/domain/models/base.py#L169-L205","documentation":"PluginExc with code -1 and message '请求服务超时' (the mojibake string 璇锋眰鏈嶅姞瓒呮椂 is GBK-misdecoded UTF-8) raised by _handle_api_timeout_error in the LLM model wrapper when the upstream model API call times out (openai APITimeoutError). The original timeout is attached as om=str(error).","triggerScenarios":"Streaming or non-streaming LLM request exceeds the client's configured timeout: slow model inference, very long prompts, network congestion, or an unreachable/slow model endpoint.","commonSituations":"Model provider latency spikes or outages; prompts near the context limit causing long time-to-first-token; timeout set too low in plugin/model configuration; egress network issues in the deployment environment.","solutions":["Retry the request; transient provider latency is the most common cause","Increase the model API timeout in the plugin/model configuration","Reduce prompt size or enable streaming so first tokens arrive sooner","Check model provider status and network connectivity from the agent service to the endpoint"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    stream = await model.astream(messages)\nexcept PluginExc as e:\n    if e.code == -1:\n        await asyncio.sleep(backoff)\n        retry_with_longer_timeout()","preventionTips":["Set a generous model timeout suited to long prompts","Use streaming for large generations to avoid full-response timeouts","Monitor provider latency and add exponential backoff retries"],"tags":["timeout","llm","network","plugin"],"backgroundTag":"request-timeout","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}