You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HTML report automatically shows the estimated API cost when using a `VlmProvider` with pricing information. The built-in Anthropic and AskUI providers include default pricing for supported Claude models.
38
+
39
+
To override pricing (for example, if you have a custom pricing agreement):
40
+
41
+
```python
42
+
from askui import AgentSettings, ComputerAgent
43
+
from askui.model_providers import AnthropicVlmProvider
44
+
from askui.reporting import SimpleHtmlReporter
45
+
46
+
with ComputerAgent(
47
+
reporters=[SimpleHtmlReporter()],
48
+
settings=AgentSettings(
49
+
vlm_provider=AnthropicVlmProvider(
50
+
model_id="claude-sonnet-4-6",
51
+
input_cost_per_million_tokens=2.5,
52
+
output_cost_per_million_tokens=12.0,
53
+
),
54
+
),
55
+
) as agent:
56
+
agent.act("Open settings")
57
+
```
58
+
59
+
The report will display:
60
+
- Total estimated cost
61
+
- Per-token rates used for the calculation
62
+
- Input and output token breakdowns (as before)
63
+
35
64
### Custom Reporters
36
65
37
66
Create custom reporters by implementing the `Reporter` interface:
0 commit comments