Co-authored-by: Alexis Tacnet <alexis@mistral.ai>
Co-authored-by: Clément Drouin <clement.drouin@mistral.ai>
Co-authored-by: Guillaume LE GOFF <guillaume.lgf@gmail.com>
Co-authored-by: Lucas Marandat <31749711+lucasmrdt@users.noreply.github.com>
Co-authored-by: Maxime Dolores <maxime.dolores@ext.mistral.ai>
Co-authored-by: Pierre Rossinès <pierre.rossines@mistral.ai>
Co-authored-by: Quentin <quentin.torroba@mistral.ai>
Co-authored-by: Val <102326092+vdeva@users.noreply.github.com>
Co-authored-by: Vincent G <10739306+VinceOPS@users.noreply.github.com>
Co-authored-by: p.vezia <166131032+le-codeur-rapide@users.noreply.github.com>
Co-authored-by: Hiba Chaabnia <Hiba-Chaabnia@users.noreply.github.com>
Co-authored-by: Nikhil Bhima <nikhilbhima@users.noreply.github.com>
Co-authored-by: Nkipohcs <Nkipohcs@users.noreply.github.com>
Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Mathias Gesbert 2026-06-04 18:26:35 +02:00 committed by GitHub
parent ad0d5c9520
commit 3f8487f761
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
197 changed files with 10819 additions and 2830 deletions

View file

@ -12,6 +12,7 @@ from vibe.cli.plan_offer.decide_plan_offer import (
WhoAmIPlanType,
decide_plan_offer,
plan_offer_cta,
plan_title,
resolve_api_key_for_plan,
)
from vibe.cli.plan_offer.ports.whoami_gateway import WhoAmIResponse
@ -263,3 +264,20 @@ def test_teleport_eligibility_depends_on_chat_plan_and_current_key(
response: WhoAmIResponse, expected: bool
) -> None:
assert PlanInfo.from_response(response).is_teleport_eligible() is expected
@pytest.mark.parametrize(
("payload", "expected_title"),
[
(PlanInfo(plan_type=WhoAmIPlanType.API, plan_name="FREE"), "Free"),
(
PlanInfo(plan_type=WhoAmIPlanType.API, plan_name="Scale plan"),
"[API] Scale plan",
),
],
ids=["free-api-plan", "paid-api-plan"],
)
def test_plan_title_uses_current_api_plan_labels(
payload: PlanInfo, expected_title: str
) -> None:
assert plan_title(payload) == expected_title