v2.8.0 (#616)
Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> Co-authored-by: Mathias Gesbert <mathias.gesbert@mistral.ai> Co-authored-by: Michel Thomazo <51709227+michelTho@users.noreply.github.com> Co-authored-by: Pierre Rossinès <pierre.rossines@mistral.ai> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
95336528f6
commit
04305bd77c
68 changed files with 3473 additions and 1764 deletions
|
|
@ -135,6 +135,7 @@ class TestTelemetryClient:
|
|||
status="success",
|
||||
decision=decision,
|
||||
agent_profile_name="default",
|
||||
model="mistral-large",
|
||||
)
|
||||
|
||||
assert len(telemetry_events) == 1
|
||||
|
|
@ -146,6 +147,7 @@ class TestTelemetryClient:
|
|||
assert properties["decision"] == "execute"
|
||||
assert properties["approval_type"] == "always"
|
||||
assert properties["agent_profile_name"] == "default"
|
||||
assert properties["model"] == "mistral-large"
|
||||
assert properties["nb_files_created"] == 0
|
||||
assert properties["nb_files_modified"] == 0
|
||||
|
||||
|
|
@ -161,6 +163,7 @@ class TestTelemetryClient:
|
|||
status="success",
|
||||
decision=None,
|
||||
agent_profile_name="default",
|
||||
model="mistral-large",
|
||||
result={"file_existed": False},
|
||||
)
|
||||
|
||||
|
|
@ -179,6 +182,7 @@ class TestTelemetryClient:
|
|||
status="success",
|
||||
decision=None,
|
||||
agent_profile_name="default",
|
||||
model="mistral-large",
|
||||
result={"file_existed": True},
|
||||
)
|
||||
|
||||
|
|
@ -197,6 +201,7 @@ class TestTelemetryClient:
|
|||
status="skipped",
|
||||
decision=None,
|
||||
agent_profile_name="default",
|
||||
model="mistral-large",
|
||||
)
|
||||
|
||||
assert telemetry_events[0]["properties"]["decision"] is None
|
||||
|
|
@ -384,6 +389,27 @@ class TestTelemetryClient:
|
|||
calls[1].kwargs["json"]["properties"]["session_id"] == "second-session-id"
|
||||
)
|
||||
|
||||
def test_send_request_sent_payload(
|
||||
self, telemetry_events: list[dict[str, Any]]
|
||||
) -> None:
|
||||
config = build_test_vibe_config(enable_telemetry=True)
|
||||
client = TelemetryClient(config_getter=lambda: config)
|
||||
|
||||
client.send_request_sent(
|
||||
model="codestral",
|
||||
nb_context_chars=1234,
|
||||
nb_context_messages=5,
|
||||
nb_prompt_chars=42,
|
||||
)
|
||||
|
||||
assert len(telemetry_events) == 1
|
||||
assert telemetry_events[0]["event_name"] == "vibe.request_sent"
|
||||
properties = telemetry_events[0]["properties"]
|
||||
assert properties["model"] == "codestral"
|
||||
assert properties["nb_context_chars"] == 1234
|
||||
assert properties["nb_context_messages"] == 5
|
||||
assert properties["nb_prompt_chars"] == 42
|
||||
|
||||
def test_send_user_rating_feedback_payload(
|
||||
self, telemetry_events: list[dict[str, Any]]
|
||||
) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue