I'm trying to use `claude-sonnet-4-20250514` with the following settings in `call_llm.py` ``` ... response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=16000, thinking={ "type": "enabled", "budget_tokens": 10000 }, messages=[ {"role": "user", "content": prompt} ] ) ... ``` after a bit of "Identifying abstractions using LLM..." I get a exception stack dump with the following error: ``` anthropic.BadRequestError: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'prompt is too long: 211230 tokens > 200000 maximum'}} ``` 211,230 tokens seems like alot... I don't think I understand how the max_tokens in the settings are being used in the prompt composing. Can anyone help me understand what parameters I need to tweak to get it to process a repo. I'm not working a huge repo (just under 500 files fetched) This is how I'm running the pipeline. ``` python main.py --dir /tmp/test-repo --include "*.java" "*.kt" --exclude ".github/*" -s 50000 ``` Thanks in advance.
Activity
zachary62 commentedon May 23, 2025
Claude models don't have large enough context (200K).
Try gemini 2.5. It has 1M context.
sad192 commentedon May 28, 2025
"Currently, is it only possible to use Gemini 2.5 for large projects?" "Are there any other solutions?"
zachary62 commentedon May 29, 2025
Another way is to modify the current flow by asking the LLMs to first choose a subset of most important files that fit in the context window