Skip to content

Conversation

@phatvo9
Copy link
Contributor

@phatvo9 phatvo9 commented Nov 3, 2025

What

Fix responses pricing

How

  • Handle usage of last chunk of chat_completions and responses in both stream and non stream.
  • Add test cases.
  • Raise error if usage reports 0 input and 0 output tokens.

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Code Coverage

Package Line Rate Health
clarifai 45%
clarifai.cli 44%
clarifai.cli.templates 33%
clarifai.client 67%
clarifai.client.auth 67%
clarifai.constants 100%
clarifai.datasets 100%
clarifai.datasets.export 80%
clarifai.datasets.upload 75%
clarifai.datasets.upload.loaders 37%
clarifai.models 100%
clarifai.modules 0%
clarifai.rag 72%
clarifai.runners 52%
clarifai.runners.models 61%
clarifai.runners.pipeline_steps 41%
clarifai.runners.pipelines 70%
clarifai.runners.utils 63%
clarifai.runners.utils.data_types 72%
clarifai.schema 100%
clarifai.urls 60%
clarifai.utils 60%
clarifai.utils.evaluation 67%
clarifai.workflows 95%
Summary 62% (8364 / 13483)

Minimum allowed line rate is 50%

Copy link
Contributor

@luv-bansal luv-bansal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@phatvo9 phatvo9 merged commit 18b0632 into master Nov 6, 2025
11 checks passed
@phatvo9 phatvo9 deleted the fix-responses-pricing branch November 6, 2025 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants