Add llm provider

From suxrobGM/logistics-app · View interactive version

Add llm provider is an AI agent skill from the GitHub repository suxrobGM/logistics-app. Add a new LLM provider or model to the AI agents. Use when adding a model from an existing provider (e.g. a new Claude version) or wiring a new OpenAI-compatible or custom-SDK endpoint. Covers the catalog entry that drives pricing, quotas and the admin model list.

How to use this skill

Skill file

Add an LLM provider or model

Background: .claude/rules/backend/ai-agent.md. The model is global and admin-selected; there is no per-tenant choice or tier.

| Adding | Steps |

| --- | --- |

| A model from an existing provider | 3 |

| An OpenAI-compatible endpoint (DeepSeek-style) | 1, 3 |

| A custom-SDK provider (Gemini-style) | 1, 2, 3 |

1. Enum and config

Add the value to LlmProvider (src/Core/Logistics.Domain.Primitives/Enums/AI/Agents/LlmProvider.cs). Config binds from Llm:Providers:{Name} (ApiKey, Model, BaseUrl) into LlmOptions.Providers; no new options class. The key comes from the env var Llm__Providers__{Name}__ApiKey, never a committed file. A compatible provider without BaseUrl hits OpenAI and 401s.

2. Custom SDK only

3. Catalog entry

Add the model to LlmModelCatalog.Models (src/Core/Logistics.Application.Abstractions/AI/), with prices in USD per million tokens (input, output, cache read, cache write) and the vendor's pricing page in the comment above the list:

new("new-model-1", "New Model 1", LlmProvider.NewProvider, new(0.50m, 2.0m, 0.05m, 0.625m), ReasoningStyle.None),

This one entry feeds the admin AI Settings dropdown, model validation, budgets and overage billing. No frontend change.

Pick ReasoningStyle deliberately:

The catalog id must equal the model id the provider sends, or cost silently falls back to Sonnet 5.5 rates. OpenAI-shaped providers fill LlmTokenUsage through OpenAIUsage.From.

Verify

Select the model in the admin AI Settings page and run a dispatch session end to end.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.