From f21abf53ee3567d3b2b4c76c95584ad17b32bb57 Mon Sep 17 00:00:00 2001 From: mjalmoudy94 Date: Tue, 13 Oct 2026 08:35:09 +0000 Subject: [PATCH] =?UTF-8?q?=D8=A8=D9=87=E2=80=8C=D8=B1=D9=88=D8=B2=D8=B1?= =?UTF-8?q?=D8=B3=D8=A7=D9=86=DB=8C:=20=D9=BE=D8=B4=D8=AA=DB=8C=D8=A8?= =?UTF-8?q?=D8=A7=D9=86=DB=8C=20=D9=BE=D9=88=DB=8C=D8=A7=20=D8=A7=D8=B2=20?= =?UTF-8?q?=D9=85=D8=AF=D9=84=E2=80=8C=D9=87=D8=A7=DB=8C=20=D8=AC=D8=AF?= =?UTF-8?q?=DB=8C=D8=AF=20=D9=88=20=D9=82=D8=A7=D9=84=D8=A8=E2=80=8C=D8=A8?= =?UTF-8?q?=D9=86=D8=AF=DB=8C=20=D8=AE=D9=88=D8=AF=DA=A9=D8=A7=D8=B1=20?= =?UTF-8?q?=D8=B9=D9=86=D8=A7=D9=88=DB=8C=D9=86=20=DA=A9=D8=A7=D8=AA=D8=A7?= =?UTF-8?q?=D9=84=D9=88=DA=AF=20=D8=A7=D8=B1=D8=A7=D8=A6=D9=87=E2=80=8C?= =?UTF-8?q?=D8=AF=D9=87=D9=86=D8=AF=D9=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/api/app/infrastructure/adapters/agy.py | 27 ++++++++++++++++++--- apps/web/package.json | 2 +- apps/web/src/lib/version.ts | 2 +- package.json | 2 +- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/apps/api/app/infrastructure/adapters/agy.py b/apps/api/app/infrastructure/adapters/agy.py index 649d0a6..e554d08 100644 --- a/apps/api/app/infrastructure/adapters/agy.py +++ b/apps/api/app/infrastructure/adapters/agy.py @@ -107,9 +107,8 @@ EFFORT_THINKING_BUDGETS: dict[str, int] = { #: a model that does not support it — that is a hard 400 from the backend. _THINKING_MARKERS: tuple[str, ...] = ( "thinking", - "gemini-3", - "gemini-2.5-pro", - "gemini-2.5-flash", + "tiered", + "gemini-", ) @@ -698,7 +697,11 @@ class AgyModelAdapter: if model_id.startswith("tab_") or model_id.startswith("chat_"): continue - display_name = str(details.get("displayName") or model_id) + raw_dn = details.get("displayName") + if raw_dn and str(raw_dn).strip(): + display_name = str(raw_dn).strip() + else: + display_name = cls._format_model_name(model_id) supports_images = bool(details.get("supportsImages")) supports_thinking = bool(details.get("supportsThinking")) if not supports_thinking and _supports_thinking(model_id): @@ -719,6 +722,22 @@ class AgyModelAdapter: ) return items + @classmethod + def _format_model_name(cls, model_id: str) -> str: + """Dynamic fallback formatter for models without a displayName from agy.""" + parts = model_id.split("-") + words: list[str] = [] + for p in parts: + if p == "tiered": + words.append("(Tiered)") + elif p in ("agent", "thinking", "image", "preview"): + words.append(f"({p.title()})") + elif p.isdigit() or any(c.isdigit() for c in p): + words.append(p) + else: + words.append(p.title()) + return " ".join(words) + @classmethod def _supported_efforts_for( cls, model_id: str, details: dict[str, Any] diff --git a/apps/web/package.json b/apps/web/package.json index fb3c203..55ff900 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "@agy/web", - "version": "0.1.2", + "version": "0.1.3", "private": true, "description": "Smart Organization frontend — Next.js App Router, RTL, dark-first.", "scripts": { diff --git a/apps/web/src/lib/version.ts b/apps/web/src/lib/version.ts index 9235c65..7481377 100644 --- a/apps/web/src/lib/version.ts +++ b/apps/web/src/lib/version.ts @@ -12,7 +12,7 @@ * "the app is on the wrong version" bug into a failing test, which is the * whole point of keeping them separate. */ -export const APP_VERSION = "0.1.2"; +export const APP_VERSION = "0.1.3"; /** What the footer pill renders — ``v`` prefix keeps it unambiguous in the UI. */ export const APP_VERSION_LABEL = `v${APP_VERSION}`; diff --git a/package.json b/package.json index 034c729..fb23386 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "smart-org", - "version": "0.1.2", + "version": "0.1.3", "private": true, "description": "Smart Organization — AI Workforce Platform. Standalone multi-tenant SaaS, independent of the Telegram bot runtime.", "packageManager": "pnpm@9.12.0",