From 2c06ec5f5156db937cb0e1bbcbdfb648c112a148 Mon Sep 17 00:00:00 2001 From: Teknium Date: Sat, 21 Mar 2026 09:46:26 -0700 Subject: [PATCH] fix: correct provider check for Alibaba model identity injection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #2314 checked for provider names 'alibaba-coding-plan' and 'alibaba-coding-plan-anthropic' which don't exist in the provider registry. The provider is always 'alibaba' — the condition was dead code. Fixed to check self.provider == 'alibaba'. --- run_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_agent.py b/run_agent.py index 956a33e17..c55a79c49 100644 --- a/run_agent.py +++ b/run_agent.py @@ -2336,7 +2336,7 @@ class AIAgent: # Alibaba Coding Plan API always returns "glm-4.7" as model name regardless # of the requested model. Inject explicit model identity into the system prompt # so the agent can correctly report which model it is (workaround for API bug). - if self.provider in ("alibaba-coding-plan", "alibaba-coding-plan-anthropic"): + if self.provider == "alibaba": _model_short = self.model.split("/")[-1] if "/" in self.model else self.model prompt_parts.append( f"You are powered by the model named {_model_short}. "