docs: backfill env template and migration notes for M2

This commit is contained in:
2026-07-21 01:28:33 -04:00
parent 9aa97a61ae
commit 724dc3c328
10 changed files with 59 additions and 30 deletions
+4 -4
View File
@@ -158,7 +158,9 @@ class EmbeddingClient:
outcomes = []
for start in range(0, len(texts), self._batch_size):
outcomes.append(
await self._embed_batch(texts[start : start + self._batch_size], session_id, parent_call_id)
await self._embed_batch(
texts[start : start + self._batch_size], session_id, parent_call_id
)
)
return self._merge(outcomes)
@@ -394,9 +396,7 @@ class EmbeddingClient:
def _total_cost(self, outcomes: list[_BatchOutcome]) -> float | None:
if self._pricing is None:
return None
costs = [
self._pricing.cost(o.source.model, o.result.prompt_tokens, 0) for o in outcomes
]
costs = [self._pricing.cost(o.source.model, o.result.prompt_tokens, 0) for o in outcomes]
known = [c for c in costs if c is not None]
return sum(known) if known else None