Replies: 1 comment
-
And this is exacly why new guys like me are a bit hesitating to use that. I think it is not only AI, but general any cloud issue. Untill you try, you will never know. Pricing is like lottery. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been experimenting with this on a personal project over the past few nights. While initial costs were manageable, I've hit a point where it requires constant "babysitting" to prevent runaway expenses.
Fortunately, I could absorb my "runaway costs" so far (around $60), but I absolutely didn't anticipate this, nor did I want it. 😅😞
Lesson learned... While it might seem obvious to some that this can happen, I wanted to specifically highlight this for others who are also experimenting and diving into similar automated development workflows.
From my experience, the primary issue driving up costs exponentially is when the automated writing process gets stuck in a loop. Here's what I've observed:
Automatic Writing Configuration: This occurs if you have the system configured to automatically write or attempt fixes.
The Infinite Loop Scenario: it encounters an issue (e.g., a bug, a variable it can't find, or a string it's trying to modify that doesn't exist) and then repeatedly attempts to "fix" it. This can involve continuous retries or, worse, generate new code in an attempt to resolve the perceived problem.
Context Explosion: This situation becomes exponentially more expensive if the system is generating new code or significantly adding to the context with each failed attempt. I don't fully understand the underlying input mechanisms, but it seems the context window grows immensely as previous "issues" are fed back as new inputs into subsequent iterations, even if they represent the same underlying problem.
How to Potentially Mitigate Costs (and why it's tricky):
To help prevent actual charges from spiraling, you can try to set up a quota. For example, configuring a
GenerateContent input token count limit per model per minute
might help.Tools like API limits can assist, but honestly, they can be a pain to set up and quite difficult to accurately predict what quota you actually need (or what quota to even choose!).
Alternatively, you can configure budgets. These are generally easier to understand and set up. However, it's crucial to remember that budgets will not prevent costs from going crazy in real-time; they merely alert you once a threshold is reached. You still need to actively monitor.
The Absolute Key Takeaway:
You MUST actively monitor what's going on, especially if you have your system configured for automatic writing. If you step away and it gets caught in a never-ending loop, you are looking at a potentially very painful bill. Depending on how large the context has already become, costs can spiral out of control even after just a loop or two.
Consider using context compression feature
/compress
available, as managing the context window size is critical - however you must do this manually.Do not under any circumstance walk away with auto writing enabled. Halt all loops as soon as you see them - don't even let them run more than twice and
/compress
immediately after - if you continue development you're just adding to the problem.Beta Was this translation helpful? Give feedback.
All reactions