Skip to content

feat: update Mistral pricing and add cost calculation tests - #24

Open
amanishimwe wants to merge 2 commits into
agentguard-ai:mainfrom
amanishimwe:feat/mistral-pricing
Open

feat: update Mistral pricing and add cost calculation tests#24
amanishimwe wants to merge 2 commits into
agentguard-ai:mainfrom
amanishimwe:feat/mistral-pricing

Conversation

@amanishimwe

Copy link
Copy Markdown
Contributor

Pull Request

Description

Updates Mistral model pricing in pricing.py (converted from current official $/M rates to per-1K) and adds unit tests for Mistral lookup + cost calculation.
Related to agentguard-ai/tealtiger#311

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Test improvements

Changes Made

  • Updated Mistral *-latest pricing values in src/tealtiger/cost/pricing.py
  • Added tests/cost/test_pricing.py with parametrized lookups and a mistral-large-latest cost calculation test

Testing

  • Manual testing performed
  • Ran pytest tests/cost/test_pricing.py -v (9 passed)
  • Ran ruff check / black on changed files

Breaking Changes

None.

Additional Notes

  • Prices use current Mistral API rates where applicable ($/M ÷ 1000*_cost_per_1k).
  • Ruff reports pre-existing C401 in get_supported_providers():
    providers = set(p.provider for p in MODEL_PRICING.values())
    # preferred: {p.provider for p in MODEL_PRICING.values()}
    # left this out for this PR, can fix it if asked to.

@amanishimwe

Copy link
Copy Markdown
Contributor Author

@nagasatish007 , if you get time , please look at this as well.

@amanishimwe

Copy link
Copy Markdown
Contributor Author

@nagasatish007 I am also open to you allocating some tasks! I have taken time to understand the workflow.

@nagasatish007

Copy link
Copy Markdown
Contributor

Thanks @amanishimwe — clean PR. Two things:

CI shows 5/21 passing — are the 16 failures pre-existing (from main) or introduced by your change? If pre-existing, that's fine and I'll merge. If introduced, let me know what's failing.
Minor: can you add a comment in pricing.py with the source URL for the Mistral rates? Makes it easier to verify when prices change again.

@nagasatish007

Copy link
Copy Markdown
Contributor

Thanks @amanishimwe — glad you want to take on more. I have two tracks available and want to match you with what fits:

Track A: Technical contributions — code, tests, integrations (like this PR).

Track B: Developer Relations (DevRel) — building relationships with developers in other communities on behalf of TealTiger. Concretely this means:

  • Engaging in framework communities (Haystack Discord, AG2 Discord, LangChain forums, n8n community) — when governance topics come up, you'd share how TealTiger addresses them
  • Opening issues or discussion posts on other repos proposing TealTiger integrations
  • Responding to developers asking about AI agent security on Twitter/X, Reddit, or Hacker News
  • Writing short tutorials or "how-to" posts showing TealTiger solving real problems
  • Helping onboard new contributors who show up on our issues (like you were onboarded here)

Basically: you'd be TealTiger's presence in the broader AI developer ecosystem — building trust with developers who haven't heard of us yet, and connecting them to the project.

Are you familiar with this kind of role? Would this interest you, or do you prefer staying purely technical? Both are valuable — no wrong answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants