Common issues and solutions when working with ModelMesh.
Cause: Package not installed or wrong Python environment.
# Verify installation
pip show modelmesh-lite
# Install if missing
pip install modelmesh-lite
# For development (editable install)
pip install -e "./src/python[yaml,dev]"Cause: Package not installed or workspace not linked.
# Install from npm
npm install @nistrapa/modelmesh-core
# For development (from repo root)
npm install # links workspace packagesCause: YAML extra not installed.
pip install modelmesh-lite[yaml]Cause: No API keys found and no YAML config loaded.
Solution: Set at least one provider API key:
export OPENAI_API_KEY="sk-..."
# OR
export ANTHROPIC_API_KEY="sk-ant-..."
# OR
export GOOGLE_API_KEY="AI..."Or load a YAML config:
client = modelmesh.create(config="modelmesh.yaml")Cause: All models in the pool are deactivated (failed or budget-exceeded).
Solutions:
- Check that your API keys are valid
- Check provider status (OpenAI, Anthropic, etc.)
- Add more providers for failover
- Check budget limits in your config
# Debug: see what models are available
client = modelmesh.create("chat-completion")
print(client.describe())Cause: File path wrong or YAML syntax error.
# Validate YAML syntax
python -c "import yaml; yaml.safe_load(open('modelmesh.yaml'))"Cause: A model's daily or monthly budget limit was reached.
Solutions:
- Increase budget limits in config
- Add
on_budget_exceeded: rotateto auto-switch to next provider - Add more providers with separate budgets
pools:
chat:
capability: generation.text-generation.chat-completion
strategy: stick-until-failure
on_budget_exceeded: rotatePossible causes:
- Provider API is slow — check provider status page
- Wrong rotation strategy —
cost-firstmay pick slower providers
pools:
chat:
strategy: latency-first # prioritize speedCause: Too many requests to a single provider.
Solutions:
- Add more providers for load distribution
- Use
round-robinorrate-limit-awarerotation - Implement request queuing in your application
Common fixes:
# Ensure you're in the repo root
cd ModelMesh
# Build with no cache
docker build --no-cache -t modelmesh .
# Check Docker is running
docker infoDebug steps:
# Check container logs
docker compose logs modelmesh-proxy
# Verify config is mounted
docker compose exec modelmesh-proxy cat /app/modelmesh.yaml
# Test health endpoint
curl http://localhost:8080/v1/modelsCause: Missing pytest-asyncio or wrong asyncio mode.
pip install pytest-asyncioThe project uses asyncio_mode = "auto" in pyproject.toml.
Cause: Dependencies not installed.
cd src/typescript
npm install
npm testPython samples:
pip install -e "./src/python[yaml]"
python samples/quickstart/python/00_hello.pyTypeScript samples:
npm install # from repo root
npx tsx samples/quickstart/typescript/00_hello.tsCause: Versions bumped in one package but not the other.
# Check current versions
grep '^version' src/python/pyproject.toml
node -p "require('./src/typescript/package.json').version"
# Sync versions
./scripts/bump-version.sh 0.2.1# Install pre-commit
pip install pre-commit
# Install hooks
pre-commit install
# Run manually on all files
pre-commit run --all-files- Check the FAQ for answers to common questions
- Search GitHub Issues
- Open a Bug Report
See also: Quick Start | System Configuration | FAQ