MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / settle

Method settle

uncommon_route/proxy.py:240–250  ·  view source on GitHub ↗
(
        self,
        reservation_id: str,
        actual_cost: float,
        *,
        model: str | None = None,
        action: str | None = None,
    )

Source from the content-addressed store, hash-verified

238 return result
239
240 async def settle(
241 self,
242 reservation_id: str,
243 actual_cost: float,
244 *,
245 model: str | None = None,
246 action: str | None = None,
247 ) -> None:
248 async with self._lock:
249 self._pending.pop(reservation_id, None)
250 self._spend.record(actual_cost, model=model, action=action)
251
252 async def release(self, reservation_id: str) -> None:
253 async with self._lock:

Callers 2

_record_stream_successFunction · 0.80
_handle_chat_coreFunction · 0.80

Calls 2

popMethod · 0.80
recordMethod · 0.45

Tested by

no test coverage detected