Dust Community Icon

Recurrent Error with Claude 3.7 Assistants in Table Queries

·
·

Hi Dust Team, I'm writing to report a recurring error with the new Claude 3.7-based assistants when they attempt to query tables. The issue doesn't occur at the start of conversations, suggesting it may be related to context window limitations, though I'm not certain about the exact mechanism. The assistant continues to use other tools properly; only table queries consistently fail after the first error occurrence in a discussion. ERROR: Error running TablesQuery app: Error querying `anthropic:claude-3-7-sonnet-20250219`: error=Too many retries (1): [model_error(retryable=, request_id=req_013WjLfGHdedEQRmr3aZxEXitrue)] AnthropicError: [invalid_request_error] input length and `max_tokens` exceed context limit: 144584 + 64000 > 204698, decrease input length or `max_tokens` and try again (code: tables_query_error) ps : Love the dark mode and the fast integration of the new claude 3.7 model

  • Avatar of Remi
    Remi
    ·
    ·

    Thanks YoiHito for flagging ! Sharing this with the team 😊

  • Avatar of YoiHito
    YoiHito
    ·
    ·

    Remi Thanks for your reactivity. I switched back to Claude 3.5 for assistants that use Table Query for now, even though the 3.7 is much better in many cases, to avoid this error until this problem is fixed. Please let me know when the issue is addressed. I can test it easily by trying to refresh the answer that gave the error.

  • Avatar of YoiHito
    YoiHito
    ·
    ·

    Remi For an update for this error it's occuring for Claude 3.7 for most agentic workflows with tool use. Here is a snipped of one of the Cursor IDE's Devs comment on a similar issue happening in Cursor:

    Hi, I'm looking into this. The specific error seems to be that sonnet 3.7 is not doing as well a job adhering to max output token limits for tool calls compared to 3.5. Looking into fixing this.

    I thought it's probably the same issue, so I posted this just in case. Take care.

  • Avatar of YoiHito
    YoiHito
    ·
    ·

    I'm thinking of system prompt solution that would limit the issue.

  • Avatar of Remi
    Remi
    ·
    ·

    YoiHito Thanks again for flagging. We had some issues last week with table queries and the new anthropic model. It should be fixed now, can you confirm?

  • Avatar of YoiHito
    YoiHito
    ·
    ·

    Will check it out as soon as I'm in front of my PC.

  • Avatar of YoiHito
    YoiHito
    ·
    ·

    Remi Unfortunately the issue still persists when retrying in the bit longer threads. First few request go just fine but when the context of the thread gets bigger it gives the same error, and once the error was triggered once there is no way to use table query with claude 3.7, the only workaround is to switch the assistant to claude 3.5 or other models.

  • Avatar of YoiHito
    YoiHito
    ·
    ·

    Actually, it might be that the problem was fixed in new conversations only. I just started a new conversation, and it wasn't throwing the error anymore after some extensive use of table queries with Claude 3.7, at least for now. So maybe it's just that when I refresh in the thread where the error occurred, it doesn't work, but in new conversations it does. Or it may be related to the fact that the assistant that I used had too many tools at the same time. I'll get back to you if the error occurs in new conversations, especially if have a way to reproduce the same error. Thanks for your help Remi.

  • Avatar of Remi
    Remi
    ·
    ·

    Awesome, thank you YoiHito! Glad it works now 👌

  • Avatar of Thê-Minh TRINH
    Thê-Minh TRINH
    ·
    ·

    Hey! I’ve had the same issue these days ERROR: Error running TablesQuery app: Error querying `anthropic:claude-3-7-sonnet-20250219`: error=Too many retries (1): [model_error(retryable=, request_id=req_01BqYJ6A7oukPBH37m9nkofmtrue)] AnthropicError: [invalid_request_error] input length and `max_tokens` exceed context limit: 141123 + 64000 > 200000, decrease input length or `max_tokens` and try again (code: tables_query_error) I’m manipulating an imported csv and asking for analyses and updates. Same observations as YoiHito:

    • The error happens after a series of messages in the conversation

    • Refreshing doesn’t work

    • Workaround: switching to Claude 3.5 or creating a fresh conversation with 3.7

  • Avatar of YoiHito
    YoiHito
    ·
    ·

    Thê-Minh TRINH I'm still not sure how exactly to reproduce the error but I can confirm that in the old conversations where the error is present for it's still not working. It's obviously related to context length but I have no idea why it's happening just for the query table tool. Did you find something else that could help the DUST team to reproduce this?