Add Execution Cost to Html Reports#243
Merged
philipph-askui merged 17 commits intomainfrom Mar 12, 2026
Merged
Conversation
…gCallback` from dict to new `` type
programminx-askui
requested changes
Mar 10, 2026
| output_cost_per_million_tokens: float | None = None, | ||
| ) -> None: | ||
| self._model_id_value = ( | ||
| model_id or os.environ.get("VLM_PROVIDER_MODEL_ID") or _DEFAULT_MODEL_ID |
Collaborator
There was a problem hiding this comment.
@mlikasam-askui and @philipph-askui ,
we need to discuaa what is the proper way of Reading and Validating Env Variables.
| currency: str | None = None | ||
| input_cost_per_million_tokens: float | None = None | ||
| output_cost_per_million_tokens: float | None = None | ||
| if self._pricing is not None: |
Collaborator
There was a problem hiding this comment.
Can we use early return instaed?
Suggested change
| if self._pricing is not None: | |
| if self._pricing is None: | |
| return |
src/askui/utils/model_pricing.py
Outdated
| Args: | ||
| input_cost_per_million_tokens (float): Cost in USD per 1M input tokens. | ||
| output_cost_per_million_tokens (float): Cost in USD per 1M output tokens. | ||
| currency (str): ISO 4217 currency code. Defaults to ``"USD"``. |
Collaborator
There was a problem hiding this comment.
If we say that the string is defined in "ISO 4217" then we should pare it or define a CURRENCY_TYPE.
-> Otherweise name of the currency displayed. e.g. € or USD or $ or EUR or Euro
|
|
||
|
|
||
| class TestModelPricingForModel: | ||
| def test_exact_match_sonnet_4_6(self) -> None: |
Collaborator
There was a problem hiding this comment.
please rewrite the check with an parameterized test.
https://docs.pytest.org/en/7.1.x/example/parametrize.html
Contributor
Author
|
@programminx-askui
|
Co-authored-by: Dominik Klotz <105296959+programminx-askui@users.noreply.github.com>
programminx-askui
requested changes
Mar 11, 2026
programminx-askui
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.