Salmalm

raw JSON →
0.30.28 verified Mon Apr 27 auth: no python

Personal AI Gateway — Python AI assistant with multi-model routing, web UI, and 66 built-in tools. Works with LLMs (OpenAI, Anthropic, Gemini, etc.) and provides a server via uvicorn+fastapi+websockets. Currently at v0.30.28, rapid development with frequent releases.

pip install salmalm
error ImportError: cannot import name 'Salmalm' from 'salmalm'
cause Outdated installation or wrong import path; Salmalm class was added in v0.28.0.
fix
Upgrade to latest version: pip install --upgrade salmalm
error RuntimeError: No API key found for provider 'openai'
cause OPENAI_API_KEY environment variable not set or empty.
fix
Set environment variable: export OPENAI_API_KEY='your-key'
error salmalm.exceptions.ConfigError: Config file 'salmalm.yaml' not found
cause The default config file is now YAML; missing file or wrong format.
fix
Create a salmalm.yaml file or set config path via environment variable SALMALM_CONFIG.
breaking Configuration file format changed in v0.30.0: from JSON to YAML. Old config files will not be read.
fix Convert your config.json to config.yaml using the provided migration script or manually.
deprecated The `salmalm.server` module is deprecated since v0.29.0; use `salmalm.create_app` instead.
fix Replace `from salmalm.server import app` with `from salmalm import create_app` and call `create_app()`.
gotcha Multiple models require separate API keys set as environment variables; missing keys cause silent fallback or errors.
fix Set environment variables for each provider you intend to use: OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, etc.

Basic usage: set an API key (e.g., OPENAI_API_KEY) and create a client to chat.

import os
os.environ['OPENAI_API_KEY'] = os.environ.get('OPENAI_API_KEY', 'your-key-here')
from salmalm import Salmalm
client = Salmalm()
response = client.chat("Hello!")
print(response)