# Intégrations externes : pouvoir créer des intégrations de type "fournisseur IA"

**URL:** <https://community.gladysassistant.com/t/integrations-externes-pouvoir-creer-des-integrations-de-type-fournisseur-ia/10421>\
**Category:** Demandes livrées\
**Tags:** feature-core, in-progress\
**Created:** [Août 1, 2026, 7:45 UTC](https://community.gladysassistant.com/t/integrations-externes-pouvoir-creer-des-integrations-de-type-fournisseur-ia/10421 "2026-08-01T07:45:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Août 1, 2026, 7:45 UTC](https://community.gladysassistant.com/t/integrations-externes-pouvoir-creer-des-integrations-de-type-fournisseur-ia/10421/1 "2026-08-01T07:45:08Z")

</div>

Pouvoir créer des intégrations externes qui puissent proposer des modèles d’IA

Demande basée sur : [Sondage : Quel est votre modèle IA préféré dans Gladys? - #26 par l.dolle](https://community.gladysassistant.com/t/sondage-quel-est-votre-modele-ia-prefere-dans-gladys/10345/26)

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Août 3, 2026, 2:52 UTC](https://community.gladysassistant.com/t/integrations-externes-pouvoir-creer-des-integrations-de-type-fournisseur-ia/10421/2 "2026-08-03T14:52:37Z")

</div>

La PR côté Gladys :

> <https://github.com/GladysAssistant/Gladys/pull/2744>
>
> External integrations can now declare type "ai" and serve as the AI
> backend of t…he assistant instead of Gladys Plus. The contract is fully
> provider-agnostic: the whole agentic loop (MCP tool calling, prompts,
> history) stays in the core, and the integration only receives
> OpenAI-compatible chat completion requests over the integration
> WebSocket (external-integration.ai.chat, 120s ack) and answers with
> OpenAI-compatible completions — a thin adapter to Claude, DeepSeek,
> OpenAI, a local LLM or any other provider.
> 
> Server:
> \- manifest type "ai" (schema + validation), no device screens
> \- ai.chat proxy service capability relayed by the supervisor
> \- AI\_PROVIDER system variable: gateway.aiChat routes all AI traffic
> (chat loop, intent router, weekly digest) to the selected provider,
> with the Gladys Plus model field stripped and no silent fallback
> \- AI works without any Gladys Plus account (message.create)
> \- GET/POST /api/v1/ai\_provider endpoints, selection cleared on
> uninstall of the selected provider
> 
> Front:
> \- AI provider selection card on the AI integration page (admin)
> \- generic external integration page branches for the ai type
> \- install warning dedicated to AI providers, catalog placement
> \- chat model selector hidden when an external provider is active
> \- en/fr/de translations
> 
> Spec: docs/specs/external-integrations.md B.18 + C.1/C.4/C.5/C.8
> updated in the same diff (spec-first rule).
> 
> Community request: https://community.gladysassistant.com/t/10421
> 
> Co-Authored-By: Claude Fable 5 \<noreply@anthropic.com\>
> Claude-Session: https://claude.ai/code/session\_01XhBhvoV4jdZEhxgadWwXV8
> 
> 
> \## Summary by CodeRabbit
> 
> \* \*\*New Features\*\*
> \* Added support for third-party AI providers using OpenAI-compatible chat completions.
> \* Administrators can select, configure, retry, or reset the AI provider.
> \* AI providers work without a Gladys Plus account.
> \* Added provider availability indicators, privacy guidance, and dedicated setup flows.
> \* \*\*Bug Fixes\*\*
> \* Uninstalling the selected provider now restores the default AI service.
> \* Improved installation routing and navigation for AI providers.
> \* AI requests consistently use the selected provider and its configuration.

La PR côté SDK :

> <https://github.com/GladysAssistant/integration-sdk-js/pull/22>
>
> SDK counterpart of GladysAssistant/Gladys#2744 (generic AI provider external int…egration, contract B.19): integrations can now declare manifest \`type: "ai"\` and serve as the AI backend of Gladys in place of Gladys Plus.
> 
> \## What's in
> 
> \- \*\*New WebSocket message type\*\* \`external-integration.ai.chat\` in \`WEBSOCKET\_MESSAGE\_TYPES.EXTERNAL\_INTEGRATION.AI\_CHAT\`.
> \- \*\*New \`onAiChat(cb)\` handler\*\*: receives the OpenAI-compatible chat completion request relayed by the core (\`{ messages, tools?, tool\_choice?, purpose?, categories? }\` — the \`model\` field is stripped core-side, picking one is the provider's job) and resolves an OpenAI-compatible completion, acked back as the \`command-result\` data. The core awaits the ack under \*\*120 s\*\* (\`AI\_CHAT\_TIMEOUT\_MS\`), not the standard 5 s.
> \- \*\*Client-side completion validation\*\*, mirroring the core's contract check: the resolved value must be an object carrying an object \`choices\[0\].message\` — anything else (including \`undefined\`) acks the command as failed with an explicit error, instead of letting a malformed completion travel to Gladys and die at the contract boundary (\`ExternalIntegrationUnavailableError\`).
> \- \*\*TypeScript typings\*\*: \`AiChatRequest\`, \`AiChatRequestMessage\`, \`AiChatCompletion\`, \`AiChatCompletionChoice\`, \`AiChatCompletionMessage\`, the \`onAiChat\` method and the \`AI\_CHAT\` message type.
> \- \*\*README\*\*: new "AI providers" section (fetch-based OpenAI-compatible example, 120 s ack window, no-silent-fallback doctrine) + a row in the Handlers table.
> \- \*\*Tests\*\*: \`test/ai.test.js\` against the fake Gladys server (success with \`data\`, tool\_calls-only completion, handler throw, malformed completions, "not implemented"), plus compile-time coverage in \`test/types/api.test-d.ts\`.
> 
> \## Checks
> 
> \- \`npm test\`: 185/185 pass
> \- \`npm run coverage\`: thresholds green (100% stmts/funcs/lines)
> \- \`npm run lint\`, \`npm run prettier-check\`, \`npm run check-types\`: clean
> 
> 🤖 Generated with \[Claude Code\](https://claude.com/claude-code)
> 
> https://claude.ai/code/session\_018mwqzunU7Hj5yXKoAwR1hi
> 
> \---
> \_Generated by \[Claude Code\](https://claude.ai/code/session\_018mwqzunU7Hj5yXKoAwR1hi)\_

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [Octobre 3, 2026, 7:13 UTC](https://community.gladysassistant.com/t/integrations-externes-pouvoir-creer-des-integrations-de-type-fournisseur-ia/10421/3 "2026-10-03T19:13:00Z")

</div>

J’ai ajouté un [commentaire](https://github.com/GladysAssistant/Gladys/pull/2744#issuecomment-5972567696) sur les spécifications de la PR.

---

<div class="post-metadata">

**Author:** ![cursor-bot](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cursor-bot/32/22252_2.png) [@cursor-bot](https://community.gladysassistant.com/u/cursor-bot)\
**Post date:** [Octobre 16, 2026, 10:08 UTC](https://community.gladysassistant.com/t/integrations-externes-pouvoir-creer-des-integrations-de-type-fournisseur-ia/10421/4 "2026-10-16T10:08:20Z")

</div>

Salut tout le monde !

Ce sujet est désormais **en cours de développement**.

Une PR a été ouverte pour ajouter le type d’intégration externe générique « ai » (fournisseurs d’IA) :

> <https://github.com/GladysAssistant/Gladys/pull/3211>
>
> \### Description
> 
> Supersedes #2744 (same design, rebased on the current master an…d reworked after @cicoub13's review there).
> 
> External integrations can declare \`type: "ai"\` and serve as the AI backend of the assistant instead of Gladys Plus. The contract is provider-agnostic: the whole agentic loop (MCP tool calling, prompts, history) stays in the core, the integration only receives OpenAI-compatible chat completion requests over the integration WebSocket (\`external-integration.ai.chat\`, 120 s ack) and answers with OpenAI-compatible completions — a thin adapter to Claude, DeepSeek, OpenAI, a host Ollama or any other provider.
> 
> \*\*Server\*\*
> \- manifest type \`ai\` (validator + vendored schema), \`ai.chat\` proxy capability, \`AI\_PROVIDER\` system variable, \`GET\`/\`POST /api/v1/ai\_provider\`, selection cleared when the selected provider is uninstalled
> \- \`gateway.aiChat\` routes all AI traffic (chat loop, intent router, scene \`ai.ask\`, weekly digest) to the selected provider, \`model\` stripped, no silent fallback to Gladys Plus
> \- the completion is bounded before it enters the loop (content length, tool-call count, function names and arguments size, unknown fields dropped), and a cap of 4 requests in flight per provider protects local CPU models
> \- \`message.create\` and \`sendWeeklyDigest\` work without Gladys Plus when an external provider is selected
> \- the scene \`ai.ask\` action aborts with \`AI\_REQUEST\_FAILED\` on a failed request instead of a \`TypeError\`
> 
> \*\*Front\*\*
> \- \`ai\` joins \`TYPES\_WITHOUT\_DEVICE\_SCREENS\` (install redirects, tabs, direct URLs), admin-only in the catalog, trust warning on the install screen
> \- AI provider selection card on the AI integration page (trust warning restated, "provider not running" warning); Plus upsell, quota and rate-limit note hidden while an external provider is active, digest settings and debug download offered as soon as the assistant has a backend; chat model selector and scene "Ask AI" upsell hidden too
> \- en / fr / de / es translations
> 
> \*\*Spec\*\*
> \- new \`docs/specs/external-integrations/capabilities/ai-type.md\` owning the type and its contracts (WS message, management routes, SDK \`onAiChat\`), per the post-split layout; \`contracts/manifest.md\`, \`contracts/management-api.md\`, \`capabilities/provider-type.md\` and \`integration-catalog-categories.md\` updated in the same diff
> 
> \*\*What changed compared with #2744, following the review there\*\*
> 1. Spec moved from the deleted single file to \`capabilities/ai-type.md\` (no B.19 identifier, cited by path); \`provider-type.md\` records that \`ai\` passes the "generic pivot interface" bar.
> 2. The external-provider branch of \`gateway.aiChat\` sits before \`callPlanGatedApi\`, with a test pinning that a paused Plus subscription still reaches the provider.
> 3. \`ai\` added to \`TYPES\_WITHOUT\_DEVICE\_SCREENS\`; catalog placement now comes from \`categories\` (\`assistants\`), not from the type.
> 4. Bundled-Ollama paragraph replaced by the documented host setup (\`OLLAMA\_HOST=172.30.0.1:11434\`, context window, no NVIDIA grant to integrations); the voice sentence reduced to "speech is out of scope".
> 5. Weekly digest and \`AskAI.jsx\` gaps closed; completion bounded; \`ai.ask\` null path fixed; concurrency cap added.
> 6. \`purpose\` values documented as the real \`AI\_CHAT\_PURPOSES\` (\`chat\`, \`intent-classification\`, \`weekly-digest\`).
> 
> Open points (recorded as "later leads" in the spec, not implemented here): a \`provider\` per \`ai.ask\` action, and selecting the integration at install time when no other provider is available. The companion SDK PR (GladysAssistant/integration-sdk-js#22) and the indexer enum still have to be updated in their own repos; until then \`ai\` integrations install through "Install from GitHub" and dev mode.
> 
> \### Related request
> 
> Forum: https://community.gladysassistant.com/t/10421
> 
> \### Checklist
> 
> \- \[x\] If a forum topic or GitHub issue exists, the description links it (\`Forum: https://community.gladysassistant.com/t/...\` or \`Closes #...\`)
> \- \[x\] Tests pass: \`cd server && npm run coverage\` (Codecov requires 100% coverage on changed lines) and Cypress (\`npm run cypress:run\`) if the UI changed
> \- \[x\] Linter and prettier pass on both front and server (\`npm run eslint\`, \`npm run prettier\`)
> \- \[x\] No undocumented breaking change
> 
> 🤖 Generated with \[Claude Code\](https://claude.com/claude-code)
> 
> https://claude.ai/code/session\_01JaNcYJ3imJoovepcWsxFSj
> 
> \---
> \_Generated by \[Claude Code\](https://claude.ai/code/session\_01JaNcYJ3imJoovepcWsxFSj)\_

N’hésitez pas à suivre la PR, à tester (optionnel, surtout pour les petites demandes) et à faire vos retours ici si besoin.

---

<div class="post-metadata">

**Author:** ![cursor-bot](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cursor-bot/32/22252_2.png) [@cursor-bot](https://community.gladysassistant.com/u/cursor-bot)\
**Post date:** [Octobre 25, 2026, 2:49 UTC](https://community.gladysassistant.com/t/integrations-externes-pouvoir-creer-des-integrations-de-type-fournisseur-ia/10421/5 "2026-10-25T14:49:18Z")

</div>


