Hi, team, the OpenAI plugin in LiveKit Agents perf...
# ask-ai
b
Hi, team, the OpenAI plugin in LiveKit Agents performs a health check by sending a GET request to the root path (/) of the configured base_url during the prewarm phase. This behavior may cause issues with some LLM API providers that don't properly handle GET requests to their root endpoints for exmaple volcengine 's service for deepseek model which base url is https://ark.cn-beijing.volces.com/api/v3. what should I do to handle it? Thanks Location: livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/llm.py (lines 597-603)
Copy code
def prewarm(self) -> None:
       async def _prewarm() -> None:
           try:
               await self._client.get("/", cast_to=str)
           except Exception:
               pass

       self._prewarm_task = asyncio.create_task(_prewarm())
t
Thanks for reaching out, 郭朋. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Could you clarify the specific issue you're facing with the GET request to the root path during the prewarm phase? For example, are you receiving a specific error or unexpected behavior from the volcengine service? This will help in identifying a suitable solution.
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!
b
下面是日志: 2025-07-04 175828,886 - openai._base_client - DEBUG - Request options: {'method': 'get', 'url': '/'} 2025-07-04 175828,887 - openai._base_client - DEBUG - Sending HTTP Request: GET https://ark.cn-beijing.volces.com/api/v3/ 2025-07-04 175828,889 - httpcore.http11 - DEBUG - send_request_headers.started request=<Request [b'GET']> 2025-07-04 175828,890 - httpcore.http11 - DEBUG - send_request_headers.complete 2025-07-04 175828,890 - httpcore.http11 - DEBUG - send_request_body.started request=<Request [b'GET']> 2025-07-04 175828,890 - httpcore.http11 - DEBUG - send_request_body.complete 2025-07-04 175828,890 - httpcore.http11 - DEBUG - receive_response_headers.started request=<Request [b'GET']> 2025-07-04 175828,897 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 404, b'Not Found', [(b'x-request-id', b'0217516231088914aa63ed2acc75b1976f5c563db6a28ca4f9660'), (b'date', b'Fri, 04 Jul 2025 095828 GMT'), (b'server', b'istio-envoy'), (b'content-length', b'0')]) 2025-07-04 175828,897 - httpx - INFO - HTTP Request: GET https://ark.cn-beijing.volces.com/api/v3/ "HTTP/1.1 404 Not Found" 2025-07-04 175828,898 - httpcore.http11 - DEBUG - receive_response_body.started request=<Request [b'GET']> 2025-07-04 175828,898 - httpcore.http11 - DEBUG - receive_response_body.complete 2025-07-04 175828,898 - httpcore.http11 - DEBUG - response_closed.started 2025-07-04 175828,898 - httpcore.http11 - DEBUG - response_closed.complete 2025-07-04 175828,899 - openai._base_client - DEBUG - HTTP Response: GET https://ark.cn-beijing.volces.com/api/v3/ "404 Not Found" Headers({'x-request-id': '0217516231088914aa63ed2acc75b1976f5c563db6a28ca4f9660', 'date': 'Fri, 04 Jul 2025 095828 GMT', 'server': 'istio-envoy', 'content-length': '0'}) 2025-07-04 175828,899 - openai._base_client - DEBUG - request_id: 0217516231088914aa63ed2acc75b1976f5c563db6a28ca4f9660 2025-07-04 175828,899 - openai._base_client - DEBUG - Encountered httpx.HTTPStatusError Traceback (most recent call last): File "/home/ubuntu/miniconda3/envs/xiaoqiuagent/lib/python3.10/site-packages/openai/_base_client.py", line 1564, in request response.raise_for_status() File "/home/ubuntu/miniconda3/envs/xiaoqiuagent/lib/python3.10/site-packages/httpx/_models.py", line 829, in raise_for_status raise HTTPStatusError(message, request=request, response=self) httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://ark.cn-beijing.volces.com/api/v3/' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404 2025-07-04 175828,899 - openai._base_client - DEBUG - Re-raising status error