> For the complete documentation index, see [llms.txt](https://vibemx.gitbook.io/neuronai-studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vibemx.gitbook.io/neuronai-studio/extending/custom-providers.md).

# Custom Providers

Add or customize LLM providers available in the agent editor and LLM workflow nodes.

## Provider registry

Providers are defined in `config/neuronai-studio.php`:

```php
'providers' => [
    'openai' => [
        'label' => 'OpenAI',
        'models' => ['gpt-4o', 'gpt-4o-mini', 'gpt-4-turbo'],
    ],
    'anthropic' => [
        'label' => 'Anthropic',
        'models' => ['claude-sonnet-4-20250514'],
    ],
    'my_provider' => [
        'label' => 'My Custom Provider',
        'models' => ['my-model-v1'],
    ],
],
```

The studio UI reads this list for the provider/model picker. Credentials are **not** configured here.

## Credentials via Neuron AI

API keys and provider drivers come from `config/neuron.php` (Neuron AI):

```env
OPENAI_KEY=sk-...
ANTHROPIC_KEY=sk-ant-...
NEURON_AI_PROVIDER=openai
```

Ensure your custom provider key matches a driver registered in Neuron AI.

## Default provider/model

```env
NEURONAI_STUDIO_DEFAULT_PROVIDER=openai
NEURONAI_STUDIO_DEFAULT_MODEL=gpt-4o-mini
```

## Programmatic registration

Extend `ProviderRegistry` at boot time if you need dynamic provider lists:

```php
use DigitalElvis\NeuronAIStudio\Registry\ProviderRegistry;

$this->app->make(ProviderRegistry::class)->register('my_provider', [
    'label' => 'My Provider',
    'models' => ['model-a', 'model-b'],
]);
```

## Provider flow

```mermaid
flowchart LR
    Config[neuronai-studio.php providers] --> UI[Agent form picker]
    NeuronConfig[config/neuron.php] --> AgentRunner
    UI --> AgentDefinition
    AgentDefinition --> AgentRunner
    AgentRunner --> NeuronDriver[Neuron LLM driver]
```

## See also

* [Configuration Reference](/neuronai-studio/reference/configuration.md)
* [Creating Agents](/neuronai-studio/agents/creating-agents.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://vibemx.gitbook.io/neuronai-studio/extending/custom-providers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
