Skip to content

fix(mistral): match Pixtral and Mixtral models#349

Open
Kcstring wants to merge 2 commits intopydantic:mainfrom
Kcstring:fix-mistral-pixtral-mixtral-match
Open

fix(mistral): match Pixtral and Mixtral models#349
Kcstring wants to merge 2 commits intopydantic:mainfrom
Kcstring:fix-mistral-pixtral-mixtral-match

Conversation

@Kcstring
Copy link
Copy Markdown
Contributor

Fixes #124.

Summary

  • Extend the Mistral provider-level model matcher to include Pixtral and Mixtral model names.
  • Add a regression test that resolves Pixtral and Mixtral models without an explicit provider id.
  • Regenerate package data for Python, JS, and JSON outputs.

Tests

  • env UV_CACHE_DIR=/tmp/uv-cache UV_PYTHON_INSTALL_DIR=/tmp/uv-python uv run --package prices -m prices build
  • env UV_CACHE_DIR=/tmp/uv-cache UV_PYTHON_INSTALL_DIR=/tmp/uv-python uv run --package prices -m prices package_data
  • env UV_CACHE_DIR=/tmp/uv-cache UV_PYTHON_INSTALL_DIR=/tmp/uv-python uv run --package prices -m prices inject_providers
  • env UV_CACHE_DIR=/tmp/uv-cache UV_PYTHON_INSTALL_DIR=/tmp/uv-python uv run --package genai-prices pytest tests/test_model_matching.py -k "mistral_model_match or pixtral or mixtral"
  • env UV_CACHE_DIR=/tmp/uv-cache UV_PYTHON_INSTALL_DIR=/tmp/uv-python uv run --package genai-prices pytest tests/test_price_calc.py -k "mistral and pixtral"
  • env UV_CACHE_DIR=/tmp/uv-cache UV_PYTHON_INSTALL_DIR=/tmp/uv-python uv run --package genai-prices genai-prices calc --input-tokens 10000 --output-tokens 10000 pixtral-12b-latest mixtral-8x7b-instruct-v0.1
  • env UV_CACHE_DIR=/tmp/uv-cache UV_PYTHON_INSTALL_DIR=/tmp/uv-python uv run ruff check tests/test_model_matching.py packages/python/genai_prices/data.py
  • env UV_CACHE_DIR=/tmp/uv-cache UV_PYTHON_INSTALL_DIR=/tmp/uv-python uv run ruff format --check tests/test_model_matching.py packages/python/genai_prices/data.py

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@alexmojaki
Copy link
Copy Markdown
Contributor

need to resolve merge conflicts in generated files now

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.

Mistral provider: pixtral-* / mixtral-* models not found by CLI (LookupError), even when YAML match includes them

2 participants