Earlier quoted context omitted.
Adding entire files into the context window and letting the AI sift through it is a very wasteful approach. It was adopted because trying to generate diffs with AI opens a whole new can of worms, but there's a very efficient approach in between: slice the files on the symbol level. So if the AI only needs the declaration of foo() and the definition of bar(), the entire file can be collapsed like this: class MyClass {…
this works if your code is exceptionally well composed. anything less can lead to looney tunes levels of goofiness in behavior, especially if there’s as little as one or two lines of crucial context elsewhere in the file. This approach saves tokens theoretically, but i find it can lead to wastefulness as it tries to figure out why things aren’t working when loading the full file would have solved the problem in a sin…
Cerebras Code
101–110 of 185 posts
Re: Cerebras Code
#102Re: Cerebras Code
#103Re: Cerebras Code
#104Re: Cerebras Code
#105Earlier quoted context omitted.
this works if your code is exceptionally well composed. anything less can lead to looney tunes levels of goofiness in behavior, especially if there’s as little as one or two lines of crucial context elsewhere in the file. This approach saves tokens theoretically, but i find it can lead to wastefulness as it tries to figure out why things aren’t working when loading the full file would have solved the problem in a sin…
Yep and it collapses in the enterprise. The code you’re referencing might well be from some niche vendor’s bloated library with multiple incoherent abstractions, etc. Context is necessarily big
I tried copy-pasting all the relevant parts into ChatGPT and gave it instructions like "add support for X to Y, similar to Z", and it got it pretty well each time. The bottleneck was really pasting things into the context window, and merging the changes back. So, I made a GUI that automated it - showed links on top of functions/classes to quickly attach them into the context window, either as just declarations, or as editable chunks.
That worked faster, but navigating to definitions and manually clicking on top of them still looked like an unnecessary step. But if you asked the model "hey, don't follow these instructions yet, just tell me which symbols you need to complete them", it would give reasonable machine-readable results. And then it's easy to look them up on the symbol level, and do the actual edit with them.
It doesn't do magic, but takes most of the effort out of getting the first draft of the edit, than you can then verify, tweak, and step through in a debugger.
Re: Cerebras Code
#106Earlier quoted context omitted.
API Error: 422 {"error":{"message":"Error from provider: {\"message\":\"body.messages.0.system.content: Input should be a valid string\",\"type\":\"invalid_request_error\",\"param\":\"validation_error\",\"code\":\"wrong_api_format\"}
i ended up getting it working through copying the transformer in this issue: https://github.com/musistudio/claude-code-router/issues/407 It hits the request per minute limit instantly and then you wait a minute.
Re: Cerebras Code
#107Earlier quoted context omitted.
Yep and it collapses in the enterprise. The code you’re referencing might well be from some niche vendor’s bloated library with multiple incoherent abstractions, etc. Context is necessarily big
Ironically, that's how I got the whole idea of symbol-level edits. I was working on project like that, and realized that a lot of work is actually fairly small edits. But to do one right, you need to you need to look through a bunch of classes, abstraction layers, and similar implementations, and then keep in your head how to get an instance of X from a pointer to Y, etc. Very annoying repetitive work. I tried copy-p…
Re: Cerebras Code
#108Tried this out with Cline using my own API key (Cerebras is also available as a provider for Qwen3 Coder via via openrouter here: https://openrouter.ai/qwen/qwen3-coder ) and realized that without caching, this becomes very expensive very quickly. Specifically, after each new tool call, you're sending the entire previous message history as input tokens - which are priced at $2/1M via the API just like output tokens.…
This seems to be rate limited by message not token so the lack of cache may matter less
Re: Cerebras Code
#109Earlier quoted context omitted.
Pretty sure this is there to prevent this[1] from happening to them [1] https://www.viberank.app/
That's a CO2 emissions leader board!
Re: Cerebras Code
#110How is this even possible?
Incase i'm missing something, why wouldn't it be possible? Claude and Gemini have similar offerings for a similar/same price, i thought. Eg if Claude Code can do it for $200/m, why can't Cerebras? (honest question, trying to understand the challenge for Cerebras that you're pointing to) edit : Maybe it's the speed? 2k tokens/s sounds... fast, much faster than Claude. Is that what you're referring to?