NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
neograph::program::ProgramMonetaryRecord Struct Reference

One provider call of a Program attempt, priced in micro-USD (1e-6 USD). More...

#include <result.h>

Public Attributes

std::string basis
 "provider_reported", "list_rates" or "route_ceiling".
 
std::string call_id
 Stable logical call slot, the provider journal's dispatch id.
 
std::string catalog_version
 The catalogue that priced an estimated or held amount: "sp-model-catalogue/1" and the SchemaProvider model catalogue's SHA-256, or before 0.16.0 a NeoGraph price catalog version and digest.
 
bool conservative = false
 Some tokens or tool uses were priced at the highest rate or count they could have billed at.
 
bool may_undercount = false
 The amount may be below the bill: the catalogue gave no price for a dearer band and the cheaper one priced it (or, before 0.16.0, an aggregator estimate at the list price).
 
std::uint64_t microunits = 0
 Amount charged to the run.
 
std::string node
 Core node that made the call.
 
std::string origin
 The provider's base URL, for example "https://openrouter.ai".
 
json pricing = json::object()
 What priced an estimated or held amount, empty before 0.16.0: entry (the catalogue entry id), service_tier when not standard, units (the entry's price rows, unit to decimal USD per unit), tool_uses (the server-tool types and caps reserved) and assumptions (sp::pricing::CostEstimate::assumptions).
 
std::string reason
 Why an amount is held (the usage state or the unknown outcome).
 
bool replayed = false
 Restored from the provider journal after a restart; its request was sent once, before the restart.
 
std::uint64_t reserved_microunits = 0
 Preflight reservation; 0 when none could be computed.
 
std::optional< std::string > served_by
 The upstream a routing gateway named as having served the call, as the SDK reports it: OpenRouter's provider on a Chat or Messages response, buffered or streamed, at an origin the policy declares a gateway.
 

Detailed Description

One provider call of a Program attempt, priced in micro-USD (1e-6 USD).

Definition at line 93 of file result.h.

Member Data Documentation

◆ origin

std::string neograph::program::ProgramMonetaryRecord::origin

The provider's base URL, for example "https://openrouter.ai".

Records written before 0.16.0 name a price catalog origin such as "openrouter".

Definition at line 101 of file result.h.

◆ served_by

std::optional<std::string> neograph::program::ProgramMonetaryRecord::served_by

The upstream a routing gateway named as having served the call, as the SDK reports it: OpenRouter's provider on a Chat or Messages response, buffered or streamed, at an origin the policy declares a gateway.

Unset when the response names none (or a name the SDK does not accept), when the origin is not a gateway, and when the outcome is unknown. It is metadata of the record only: it is outside the call's journal identity and digests, and a record restored from the journal, or adopted by a fork, keeps the value it was stored with. Records written before it was added have none.

Definition at line 142 of file result.h.


The documentation for this struct was generated from the following file: