Repository navigation
Description
Problem
Currently, adding a new LLM provider requires modifying Graphify source code (llm.py) and adding a new provider entry.
For example, I was able to use NVIDIA's OpenAI-compatible endpoint successfully by adding a provider configuration locally, but this required editing Graphify internals. Users without the ability or confidence to patch the source are effectively limited to the built-in providers.
Since Graphify already treats providers as metadata (base URL, model name, env key, temperature, pricing, etc.), adding support for new OpenAI-compatible providers should not require a code change.
Proposed Solution
Allow users to register custom providers through the CLI.
Example:
graphify provider add nvidia \
--base-url https://integrate.api.nvidia.com/v1 \
--default-model minimaxai/minimax-m2.7 \
--env-key NVIDIA_API_KEYThen use it normally:
graphify . --backend nvidiaPossible additional commands:
graphify provider list
graphify provider show nvidia
graphify provider remove nvidiaProviders could be stored in a user configuration file (for example ~/.graphify/providers.json) and merged with the built-in provider registry at runtime.
Benefits
- No source-code modifications required.
- Enables NVIDIA NIM and other OpenAI-compatible endpoints.
- Supports self-hosted vLLM deployments.
- Supports OpenRouter, Together AI, DeepInfra, Fireworks, LiteLLM gateways, and future providers.
- Reduces maintenance burden since new providers do not require upstream changes.
- Keeps existing built-in providers unchanged.
Additional context:
I tested this locally by adding a provider entry in llm.py:
"nvidia": {
"base_url": "https://integrate.api.nvidia.com/v1",
"default_model": "minimaxai/minimax-m2.7",
"env_key": "OPENAI_API_KEY",
"model_env_key": "GRAPHIFY_OPENAI_MODEL",
"pricing": {"input": 0.0, "output": 0.0},
"temperature": 0,
},After adding the provider entry, Graphify was able to generate graphs using the NVIDIA endpoint without requiring changes elsewhere in the request flow.
This suggests the current architecture is already largely provider-agnostic and that a user-configurable provider registry could be implemented with relatively small changes.
Activity
safishamsi commentedon May 30, 2026
Landed in commit a9d6be6.
Your analysis was right — the architecture was already there. Three changes:
1. Provider registry loaded at import —
~/.graphify/providers.json(global) and.graphify/providers.json(per-project) are merged intoBACKENDSat module import time. Built-in provider names are protected and cannot be overridden. Missingpricingdefaults to zero soestimate_costnever blows up.2. CLI commands:
3.
detect_backend()updated — custom providers are tried after all built-ins (gemini → kimi → claude → openai → deepseek → bedrock → ollama → custom), so they never shadow a configured paid key silently.Caveat noted in the issue holds: only OpenAI-compatible endpoints work this way (claude/bedrock have bespoke transports). NVIDIA NIM, vLLM, OpenRouter, Together, LiteLLM etc. all work fine.
add custom LLM provider registry via providers.json (closes Graphify-…
add custom LLM provider registry via providers.json (closes Graphify-…