-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[Bug]: Crawl returning 'str' object has no attribute 'choices #979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Same here. Using deepseek chat API |
Hey! Thanks for replying. Are you using the deepseek API inside crawl4ai? or are you using it standalone?
|
Inside LLMExtractionStrategy as:
|
I'm running my API's through openrouter and getting this error. `
Output: {'index': 0, 'error': True, 'tags': ['error'], 'content': 'litellm.BadRequestError: DeepseekException - {"error":{"message":"deepseek-chat is not a valid model ID","code":400},"user_id":"user_2th1C5iID3WInICREZPY1NCmXhb"}'} Have you ran into this at all? |
Yes, I'm facing the same issue with DeepSeek model through groq Api |
crawl4ai version
0.5.0
Expected Behavior
Return a normal crawl matching my schema.
Current Behavior
I am crawling a set of about 600 links. For some links, the crawl works perfectly, but for others, the crawler returns:
[
{
"index": 0,
"error": true,
"tags": [
"error"
],
"content": "'str' object has no attribute 'choices'"
}
]
there is no pattern for which links the crawler returns this for which makes me wonder whether this is an API issue. Has anyone seen or encountered this bug?
Is this reproducible?
Yes
Inputs Causing the Bug
Steps to Reproduce
Code snippets
OS
mac)S
Python version
3.13
Browser
Chrome
Browser version
No response
Error logs & Screenshots (if applicable)
No response
The text was updated successfully, but these errors were encountered: