Skip to content

fix(issue-4): use LLM-aware estimator for circuit breaker cost resolution (with E2E)#23

Open
levleontiev wants to merge 2 commits intomainfrom
fix/issue-4-final
Open

fix(issue-4): use LLM-aware estimator for circuit breaker cost resolution (with E2E)#23
levleontiev wants to merge 2 commits intomainfrom
fix/issue-4-final

Conversation

@levleontiev
Copy link
Contributor

Fixes #4.

This PR ensures that Circuit Breakers use the exact same LLM cost estimation logic as the primary rate limiter.

Changes:

  • rule_engine.lua: calls llm_limiter.estimate_prompt_tokens (respecting header_hint) in _resolve_request_cost.
  • rule_engine_spec.lua: added unit tests for CB cost resolution.
  • test_header_hint.py: added E2E regression test.

Verified with 428+ unit tests and E2E suite.

@@ -0,0 +1,38 @@
import uuid
import requests
import pytest
import uuid
import requests
import pytest
import time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test Coverage Gap: spec use-cases vs unit/integration/e2e (UC-01..UC-19)

2 participants