bitfab-py 0.76.3__tar.gz → 0.76.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/PKG-INFO +1 -1
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/simulation_plan.py +26 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/pyproject.toml +1 -1
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/README.md +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/__init__.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/agent_middleware.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/approval.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/assertion_categories.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/baml.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/baml_auto_trace.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/categories.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/claude_agent_sdk.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/client.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/client_patching.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/cloudReplay.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/cloud_replay_cli.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/commit_ref.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/compress.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/constants.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/datasets.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/db_snapshot.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/error_chain.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/experiment_id.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/experiments.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/finalizers.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/git_command.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/git_state.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/graders.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/http.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/integration_fixture.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/jev.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/labels.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/langgraph.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/langgraph_integration.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/langgraph_runs.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/mock_matching.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/mock_override.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/openai_agent_sdk.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/organization_members.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/otel.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/payload_budget.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/processor_payload.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/provider_calls.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/replay.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/replay_branch.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/replay_cli.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/replay_heartbeat.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/replay_interrupt.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/replay_invocation.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/replay_memory.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/replay_processes.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/replay_registry.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/seed_cli.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/selective_replay.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/serialize.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/span_meta.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/span_origin.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/spans.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/subtree.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/thread_propagation.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/timestamp.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/trace_completion.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/trace_metadata.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/trace_payload.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/traces.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/tracing.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/transport.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/transport_types.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/verdicts.py +0 -0
- {bitfab_py-0.76.3 → bitfab_py-0.76.4}/bitfab/warn_once.py +0 -0
|
@@ -117,6 +117,31 @@ def has_error(payload: dict[str, Any]) -> bool:
|
|
|
117
117
|
return span_data is not None and span_data.get("error") is not None
|
|
118
118
|
|
|
119
119
|
|
|
120
|
+
USAGE_FIELDS = (
|
|
121
|
+
"inputTokens",
|
|
122
|
+
"outputTokens",
|
|
123
|
+
"cachedInputTokens",
|
|
124
|
+
"cacheReadTokens",
|
|
125
|
+
"costUsd",
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def _is_usage_entry(entry: Any) -> bool:
|
|
130
|
+
return isinstance(entry, dict) and any(
|
|
131
|
+
isinstance(entry.get(field), (int, float))
|
|
132
|
+
and not isinstance(entry.get(field), bool)
|
|
133
|
+
for field in USAGE_FIELDS
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def has_usage(payload: dict[str, Any]) -> bool:
|
|
138
|
+
span_data = _span_data_of(payload)
|
|
139
|
+
contexts = span_data.get("contexts") if span_data is not None else None
|
|
140
|
+
return isinstance(contexts, list) and any(
|
|
141
|
+
_is_usage_entry(entry) for entry in contexts
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
|
|
120
145
|
def strip_content(payload: dict[str, Any]) -> dict[str, Any]:
|
|
121
146
|
raw_span = payload.get("rawSpan")
|
|
122
147
|
span_data = _span_data_of(payload)
|
|
@@ -382,6 +407,7 @@ class SimulationPlan:
|
|
|
382
407
|
and not self.disabled()
|
|
383
408
|
and has_parent(payload)
|
|
384
409
|
and not has_error(payload)
|
|
410
|
+
and not has_usage(payload)
|
|
385
411
|
and not recorded_by_framework(payload)
|
|
386
412
|
and not declared_in_code(payload)
|
|
387
413
|
and self.content_off(trace_function_key, name)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|