Official Codebase of 3DCodeVerse
Python
pricing: an agy session prices at its model's rate — the effort suffix (-low/-medium/-high) is not another model
gaoypeng4bf9436359c8
diff --git a/harness/codeverse3d/agents/backends.py b/harness/codeverse3d/agents/backends.pyindex cdc6e315..4f792ef5 100644--- a/harness/codeverse3d/agents/backends.py+++ b/harness/codeverse3d/agents/backends.py@@ -71,7 +71,7 @@ from codeverse3d.agents.materialize import MCP_SERVER_NAME, MCP_TOOL_TIMEOUT_MS,from codeverse3d.config import get_settingsfrom codeverse3d.contracts.agent import AgentJob, AgentResultfrom codeverse3d.contracts.common import Usage-from codeverse3d.models.pricing import cache_write_surcharge, estimate_cost, openai_usage+from codeverse3d.models.pricing import EFFORTS, cache_write_surcharge, estimate_cost, openai_usagefrom codeverse3d.models.retry import KeyPool, KeyPoolExhaustedfrom codeverse3d.proc import read_jsonl_lenient, run_subprocess@@ -941,8 +941,6 @@ class CodexAgent(_CliAgent):# ===================================================================== antigravity-#: reasoning efforts agy exposes for the models that have them-EFFORTS = ("low", "medium", "high")#: what a bare id is resolved to when agy offers only effort-suffixed spellingsDEFAULT_EFFORT = "medium"_EFFORT_SUFFIXES = tuple(f"-{e}" for e in EFFORTS)diff --git a/harness/codeverse3d/models/pricing.py b/harness/codeverse3d/models/pricing.pyindex a74ac75a..fca03d4e 100644--- a/harness/codeverse3d/models/pricing.py+++ b/harness/codeverse3d/models/pricing.py@@ -198,8 +198,11 @@ def _normalise(model: str) -> str:return model.strip().lower()+#: the reasoning efforts agy spells into its model ids (``gemini-3.7-flash-medium``): the same+#: model at the same per-token rate — unmatched, every agy session was priced $0 (live, 2026-09-23)+EFFORTS = ("low", "medium", "high")# words that may follow a priced model id without changing which model it is-_VERSION_WORDS = frozenset({"latest", "preview", "exp", "beta", "alpha", "stable", "snapshot"})+_VERSION_WORDS = frozenset({"latest", "preview", "exp", "beta", "alpha", "stable", "snapshot", *EFFORTS})def _is_version_suffix(rest: str) -> bool:diff --git a/harness/tests/models/test_pricing.py b/harness/tests/models/test_pricing.pyindex c76350a6..8d465087 100644--- a/harness/tests/models/test_pricing.py+++ b/harness/tests/models/test_pricing.py@@ -29,6 +29,9 @@ def test_gemini_cost_math():("gemini", "gemini-3.7-flash-preview-09", "gemini-3.7-flash"),("gemini", "gemini-3.7-flash-latest", "gemini-3.7-flash"),("gemini", "gemini-2.5-flash-image-preview", "gemini-2.5-flash-image"),+ # agy's effort-suffixed ids (every agy session was priced $0 until 2026-09-23)+ ("gemini", "gemini-3.7-flash-medium", "gemini-3.7-flash"),+ ("gemini", "gemini-3.7-flash-high", "gemini-3.7-flash"),],)def test_a_dated_or_tagged_id_prices_on_its_family_row(provider, model, row):