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",