From cff9305fe6972de416d8394483f4a29c79c8584a Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Tue, 6 Oct 2026 11:58:11 +0530 Subject: [PATCH] refactor(agent): drop redundant str() wrapping around custom_provider_slug args Gate C11 r4 quality: custom_provider_slug already coerces with str(value or "").strip(), so the caller-side wrapping was noise. No behaviour change. --- agent/reasoning_promotion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/reasoning_promotion.py b/agent/reasoning_promotion.py index ad5d8fd6c5..9dd6e0f211 100644 --- a/agent/reasoning_promotion.py +++ b/agent/reasoning_promotion.py @@ -57,7 +57,7 @@ def answer_in_reasoning_capability(agent: Any) -> bool: ids = {custom_provider_slug(p) for p in (provider, requested) if p.startswith("custom:")} entries = list(_entries_for_route(base_url, custom_providers, None)) live = [e for e in entries - if custom_provider_slug(str(e.get("name") or ""), str(e.get("provider_key") or "")) in ids] + if custom_provider_slug(e.get("name"), e.get("provider_key")) in ids] flags = {v for e in live or entries if isinstance(v := (e.get("capabilities") or {}).get(_ANSWER_IN_REASONING_CAPABILITY), bool)} if flags: