Skip to content

Commit ef5f1bd

Browse files
lchoquelclaude
andcommitted
Rename platform_llm_id to platform_model_id in LLMTokenCostReport for consistency
All other report types (ImgGen, Extract, Search, Fetch) already use platform_model_id as the field name. The LLM report was the only one using a domain-specific field name, while the serialized enum keys remain domain-specific for flat dictionary output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f5e60d9 commit ef5f1bd

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

pipelex/cogt/llm/llm_report.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class LLMTokenCostReport(BaseModel):
3535
model_type: str = "llm"
3636
job_metadata: JobMetadata
3737
inference_model_name: str
38-
platform_llm_id: str
38+
platform_model_id: str
3939

4040
nb_tokens_by_category: NbTokensByCategoryDict
4141
costs_by_token_category: CostsByCategoryDict
@@ -47,7 +47,7 @@ def as_flat_dictionary(self) -> dict[str, Any]:
4747
dict_for_llm: dict[str, Any] = {
4848
LLMTokenCostReportField.MODEL_TYPE: self.model_type,
4949
LLMTokenCostReportField.LLM_NAME: self.inference_model_name,
50-
LLMTokenCostReportField.PLATFORM_LLM_ID: self.platform_llm_id,
50+
LLMTokenCostReportField.PLATFORM_LLM_ID: self.platform_model_id,
5151
}
5252
the_dict.update(dict_for_llm)
5353
dict_for_nb_tokens = {

pipelex/cogt/usage/cost_registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def compute_cost_report(cls, tokens_usage: TokensUsage) -> TokenCostReport:
222222
model_type=tokens_usage.model_type,
223223
job_metadata=tokens_usage.job_metadata,
224224
inference_model_name=tokens_usage.inference_model_name,
225-
platform_llm_id=tokens_usage.inference_model_id,
225+
platform_model_id=tokens_usage.inference_model_id,
226226
nb_tokens_by_category=tokens_usage.nb_tokens_by_category,
227227
costs_by_token_category=costs_by_token_category,
228228
)

0 commit comments

Comments
 (0)