feat(ai_client): isolation of current_tier using threading.local() for parallel agent safety
This commit is contained in:
@@ -20,7 +20,7 @@ def generate_tickets(track_brief: str, module_skeletons: str) -> list[dict[str,
|
||||
# Set custom system prompt for this call
|
||||
old_system_prompt = ai_client._custom_system_prompt
|
||||
ai_client.set_custom_system_prompt(system_prompt or "")
|
||||
ai_client.current_tier = "Tier 2"
|
||||
ai_client.set_current_tier("Tier 2")
|
||||
last_error = None
|
||||
try:
|
||||
for _ in range(3):
|
||||
@@ -53,7 +53,7 @@ def generate_tickets(track_brief: str, module_skeletons: str) -> list[dict[str,
|
||||
finally:
|
||||
# Restore old system prompt and clear tier tag
|
||||
ai_client.set_custom_system_prompt(old_system_prompt or "")
|
||||
ai_client.current_tier = None
|
||||
ai_client.set_current_tier(None)
|
||||
|
||||
from src.dag_engine import TrackDAG
|
||||
from src.models import Ticket
|
||||
|
||||
Reference in New Issue
Block a user