diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-09 19:31:13 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-09 19:31:13 +0100 |
| commit | 33060a4aab87a79d222b10d088e01acf6ac8be29 (patch) | |
| tree | 5a5cc2c73f0c6814919541f40f93f78456f33fca /tests | |
| parent | 7a985a14d440acdda93dc7a43ee7c6bdecc2bf44 (diff) | |
| download | deck-it-33060a4aab87a79d222b10d088e01acf6ac8be29.tar.gz deck-it-33060a4aab87a79d222b10d088e01acf6ac8be29.zip | |
feat: opencode session spend and brand marks in the LLM card
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_llm.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_llm.py b/tests/test_llm.py index ea28b08..d64aef1 100644 --- a/tests/test_llm.py +++ b/tests/test_llm.py @@ -30,8 +30,10 @@ class Up(unittest.TestCase): ], "/api/last_session": {"sessions": [ {"program": "opencode", "rows": [ - {"provider": "together", "model": "qwen", "calls": 1}, - {"provider": "deepseek", "model": "v4", "calls": 3}, + {"provider": "together", "model": "qwen", "calls": 1, + "cost_usd": 0.2, "tokens": 200}, + {"provider": "deepseek", "model": "v4", "calls": 3, + "cost_usd": 0.3, "tokens": 300}, ]}, ]}} st = llm.make({"llm": {"url": "http://x"}, @@ -43,6 +45,9 @@ class Up(unittest.TestCase): self.assertEqual(st["opencode"]["tokens"], 1500) self.assertEqual(st["opencode"]["calls"], 4) self.assertEqual(st["opencode"]["model"], "v4") + self.assertEqual(st["opencode"]["session_cost"], 0.5) + self.assertEqual(st["opencode"]["session_calls"], 4) + self.assertEqual(st["opencode"]["session_tokens"], 500) def test_handles_the_real_latest_shape(self): data = {"/api/claude_limits": {"latest": {"context_pct": 42, "five_hour_pct": 10}}, |
