Skip to content

Automate browser based workflows with AI

Reserve 500m CPU per secure CodeBlock runner pod and run 37 replicas on the same node (SKY-17700) (#8784)

Shuchang Zheng4ef05fab3432
diff --git a/tests/unit/test_copilot_model_telemetry.py b/tests/unit/test_copilot_model_telemetry.py
index 4c6b9b2e3..053542107 100644
--- a/tests/unit/test_copilot_model_telemetry.py
+++ b/tests/unit/test_copilot_model_telemetry.py
@@ -9,7 +9,6 @@ from types import SimpleNamespace
from typing import Any, Self, cast
from unittest.mock import AsyncMock, MagicMock
-import litellm
import pytest
from agents import ItemHelpers, ModelSettings, RunContextWrapper, function_tool
from agents.extensions.models.litellm_model import LitellmModel
@@ -17,7 +16,6 @@ from agents.items import TResponseInputItem
from agents.mcp import MCPServer, MCPUtil
from agents.models.interface import ModelTracing
from litellm.integrations.anthropic_cache_control_hook import AnthropicCacheControlHook
-from litellm.llms.anthropic.chat.transformation import AnthropicConfig
from litellm.llms.vertex_ai.gemini.transformation import _gemini_convert_messages_with_history
from litellm.types.llms.openai import ResponsesAPIResponse
from litellm.types.utils import Delta
@@ -670,33 +668,6 @@ def test_model_call_cost_uses_runtime_litellm_pricing(monkeypatch: pytest.Monkey
}
-def test_anthropic_cache_writes_and_reads_are_priced_at_their_own_rates() -> None:
- usage = AnthropicConfig().calculate_usage(
- usage_object={
- "input_tokens": 1200,
- "cache_creation_input_tokens": 3000,
- "cache_read_input_tokens": 20000,
- "output_tokens": 400,
- },
- reasoning_content=None,
- )
- telemetry = model_telemetry_module.CopilotModelCallTelemetry(model_call_index=1)
- telemetry.capture(usage)
- rates = litellm.model_cost["claude-sonnet-5-5"]
-
- assert (rates["cache_creation_input_token_cost"], rates["cache_read_input_token_cost"]) == (
- pytest.approx(1.25 * rates["input_cost_per_token"]),
- pytest.approx(0.1 * rates["input_cost_per_token"]),
- )
- assert (telemetry.cache_read_tokens, telemetry.cache_write_tokens) == (20000, 3000)
- assert model_telemetry_module._model_call_cost(telemetry, "claude-sonnet-5-5") == pytest.approx(
- 1200 * rates["input_cost_per_token"]
- + 3000 * rates["cache_creation_input_token_cost"]
- + 20000 * rates["cache_read_input_token_cost"]
- + 400 * rates["output_cost_per_token"]
- )
-
-
def test_model_call_cost_normalizes_dated_gpt56_response_model(monkeypatch: pytest.MonkeyPatch) -> None:
priced_models: list[str] = []