Skip to content

v0.1.0.2 - Provider catalog

Latest

Choose a tag to compare

@aische aische released this 15 Jul 11:32

v0.1.0.2 - Provider catalog

This release adds a JSON provider catalog so you can configure LLM endpoints, API key env vars, and protocols without hardcoding providers in Haskell. Built-in providers (OpenAI, Claude, Gemini, DeepSeek, Ollama) still work out of the box; providers.json lets you extend or override them.

Highlights

Provider catalog (providers.json)

Define providers in JSON alongside your model catalog. Each entry specifies:

  • providerName - key referenced from model-catalog.json
  • protocol - "openai", "claude", "gemini", "ollama", or "deepseek"
  • baseUrl - provider host/base URL
  • apiKeyEnv - env var for the API key (omit for keyless providers like Ollama)
  • baseUrlEnv - optional env var to override baseUrl at runtime

A reference providers.json is bundled with the package. When you load models via loadModelOrThrow or loadModelsOrThrow, the loader looks for providers.json in the same directory as your model catalog and merges it with built-in defaults - file entries add new providers or override existing ones by providerName.

OpenAI-compatible providers

Add OpenRouter, Groq, Together, or other OpenAI-compatible APIs by adding a catalog entry with "protocol": "openai", then reference its providerName from your model catalog.

Runtime base URL overrides

Built-in providers now support optional baseUrlEnv overrides:

  • OPENAI_BASE_URL
  • DEEPSEEK_BASE_URL
  • OLLAMA_BASE_URL

New API

  • ProviderCatalogItem - provider catalog entry type
  • loadProviderCatalog - load a provider catalog from a file
  • loadGatewaysFromCatalog - build gateways from a loaded catalog

loadGateways and loadGatewaysWithDotenv continue to use built-in defaults only. Custom providers apply when loading models through the model-catalog loaders, or when you call the new catalog APIs explicitly.

Upgrade notes

No breaking changes from v0.1.0.1. Existing setups that only use model-catalog.json and built-in providers work unchanged. To use custom or overridden providers, add a providers.json next to your model catalog.

Install

cabal update
cabal build

Requires GHC 9.6+ with GHC2021.

Full changelog: v0.1.0.1...v0.1.0.2