oscerd opened a new pull request, #25167:
URL: https://github.com/apache/camel/pull/25167

   ### Motivation
   
   Follow-up to 
[CAMEL-24223](https://issues.apache.org/jira/browse/CAMEL-24223) / #25052, 
which merged before these review refinements landed. Picks up the remaining 
points from that PR's review.
   
   ### Changes
   
   - **`formatCost` now uses `Locale.ROOT`** for both branches. Previously 
`String.format("$%.6f", cost)` used the JVM default locale, so under a 
comma-decimal locale (e.g. French) the tool emitted `$0,003000` — MCP clients 
that parse these strings would break. This is the substantive fix.
   - **Model-specific disclaimer.** The top-level disclaimer now states 
explicitly that token-based (LLM) components are priced as a *specific* model, 
not a provider-wide figure, and that Nova Lite / Haiku / local models (Ollama) 
cost far less, often ~zero — so the estimate is not misread as a real cost for 
those. Addresses davsclaus's concern about phantom costs for provider-agnostic 
components.
   - **Tighter tests.** `shouldExtractSchemesCorrectly` now uses 
`containsExactlyInAnyOrder("file", "docling", "aws-bedrock", "aws2-s3")` 
(catches both a false `uri` capture and a dropped `file` scheme), and 
`shouldEstimateCostForAiPipeline` pins the breakdown to exactly 3 priced 
components and asserts the computed `aws-bedrock` per-execution cost rather 
than only the count.
   
   ### Testing
   
   `RouteCostEstimateToolsTest` — 11 tests, all passing against current `main`.
   
   Main-only (4.22.0), additive — no backport.
   
   _Claude Code on behalf of Andrea Cosentino (@oscerd)._
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to