mirror of
https://github.com/shareAI-lab/analysis_claude_code.git
synced 2026-08-06 12:03:37 +08:00
Merge pull request #463 from ggttyy1/fix/with-retry-lambda
Fix/resolve lambda default param capturing current_model
This commit is contained in:
@@ -272,10 +272,10 @@ def agent_loop(messages: list, context: dict):
|
|||||||
# ── LLM call: with_retry handles 429/529, outer handles rest ──
|
# ── LLM call: with_retry handles 429/529, outer handles rest ──
|
||||||
try:
|
try:
|
||||||
response = with_retry(
|
response = with_retry(
|
||||||
lambda mt=max_tokens, mdl=state.current_model:
|
lambda: client.messages.create(
|
||||||
client.messages.create(
|
model=state.current_model, system=system,
|
||||||
model=mdl, system=system, messages=messages,
|
messages=messages, tools=TOOLS,
|
||||||
tools=TOOLS, max_tokens=mt),
|
max_tokens=max_tokens),
|
||||||
state)
|
state)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# Path 2: prompt_too_long -> reactive compact (once)
|
# Path 2: prompt_too_long -> reactive compact (once)
|
||||||
|
|||||||
Reference in New Issue
Block a user