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_KEY
Then use it normally:
graphify . --backend nvidia
Possible additional commands:
graphify provider list
graphify provider show nvidia
graphify provider remove nvidia
Providers 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.
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:
Then use it normally:
graphify . --backend nvidiaPossible additional commands:
Providers could be stored in a user configuration file (for example
~/.graphify/providers.json) and merged with the built-in provider registry at runtime.Benefits
Additional context:
I tested this locally by adding a provider entry in
llm.py: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.