Model adapter
tsforge does not ship a model. It calls your model through any OpenAI-compatible HTTP API (local vLLM, Ollama-compatible proxy, OpenRouter, etc.).
Configure models in ~/.tsforge/models.json. Override per run with environment variables listed below.
Starter defaults
Section titled “Starter defaults”| Setting | Default |
|---|---|
| Base URL | http://localhost:8000/v1 |
| Model | deepseek-v4-flash |
| Max tokens | 16384 |
These defaults match tsforge’s dev setup. Replace baseUrl and model with yours. The gate and guardrails stay the same regardless of provider.
Common overrides
Section titled “Common overrides”| Variable | Purpose |
|---|---|
TSFORGE_BASE_URL | API endpoint |
TSFORGE_MODEL | model name |
TSFORGE_API_KEY | API key when required |
TSFORGE_MAX_TOKENS | output token cap |
TSFORGE_CONTEXT_WINDOW | context size for compaction |
TSFORGE_COMPACT_AT | auto-compact threshold (default 0.8) |
Full list: Environment variables.
Stream guard
Section titled “Stream guard”If model prose repeats degenerately (not tool JSON), tsforge aborts the run to avoid infinite token burn.