Repository navigation
fix: keep keyword billing refusal reasons - #393
Closed
hamitarsln wants to merge 1 commit into
Closed
hamitarsln wants to merge 1 commit into
hamitarsln wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The implementation matches the stated billing, privacy, and replay requirements with focused regression coverage.
0 open findings
What changed in this PR
Preserves specific billing refusal codes while keeping sensitive diagnostics private and preventing duplicate model calls.
Changes:
- Distinguishes spending limits from other billing refusals.
- Adds safe, cause-specific failure messages and regression coverage.
| File | Description |
|---|---|
src/tin_lite/keyword_plan_activities.py |
Preserves and reports safe billing refusal codes. |
tests/test_keyword_plan.py |
Tests refusal classification, privacy, and retry behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
Superseded by #403: keyword plan billing refusals now use the shared |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Keyword planning called every billing refusal a spending limit. A missing model price or an already attempted operation could therefore get the wrong explanation.
Keep actual run/project limits as spending limits. Other billing refusals keep their fixed code, and the failure message names it. Raw exception text stays private. Existing call replay and spending guards stay in place.
Verification
Notes
Verification uses local test providers. The changed worker has not been deployed or tested with a live billing refusal. No pricing or spending authority changed.