The Docus assistant currently requires either AI_GATEWAY_API_KEY or VERCEL_OIDC_TOKEN to be present at build time.
This makes sense when using Vercel AI Gateway, but also hard-couples the assistant module's enablement to Gateway authentication.
I'd like to use the existing Docus assistant with @ai-sdk/mistral and connect directly to the Mistral API using createMistral(). The rest of the assistant architecture already appears provider-agnostic and built on the AI SDK.
Proposed solution
Add an explicit enabled option to the assistant configuration:
export default defineNuxtConfig({
docus: {
assistant: {
enabled: true,
},
},
})
When explicitly enabled, Docus would register the assistant components and API path without requiring AI_GATEWAY_API_KEY or VERCEL_OIDC_TOKEN.
Vercel AI Gateway could remain the default and recommended setup.
This would provide an escape hatch for users who want to supply or override the server handler with their own AI SDK implementation and provider.
Current workaround
My current plan is to provide a dummy AI_GATEWAY_API_KEY so the module is enabled, then override the assistant server route locally with an AI SDK implementation using createMistral().
This should work, but relying on a fake Gateway credential to enable a provider-agnostic AI SDK implementation feels unnecessary.
Additional context
I'm not proposing that Docus needs to add first-class configuration for every AI SDK provider.
An explicit way to enable the assistant without Gateway authentication would be enough to support custom provider implementations while keeping the current Gateway experience as the default.
The Docus assistant currently requires either
AI_GATEWAY_API_KEYorVERCEL_OIDC_TOKENto be present at build time.This makes sense when using Vercel AI Gateway, but also hard-couples the assistant module's enablement to Gateway authentication.
I'd like to use the existing Docus assistant with
@ai-sdk/mistraland connect directly to the Mistral API usingcreateMistral(). The rest of the assistant architecture already appears provider-agnostic and built on the AI SDK.Proposed solution
Add an explicit
enabledoption to the assistant configuration:When explicitly enabled, Docus would register the assistant components and API path without requiring
AI_GATEWAY_API_KEYorVERCEL_OIDC_TOKEN.Vercel AI Gateway could remain the default and recommended setup.
This would provide an escape hatch for users who want to supply or override the server handler with their own AI SDK implementation and provider.
Current workaround
My current plan is to provide a dummy
AI_GATEWAY_API_KEYso the module is enabled, then override the assistant server route locally with an AI SDK implementation usingcreateMistral().This should work, but relying on a fake Gateway credential to enable a provider-agnostic AI SDK implementation feels unnecessary.
Additional context
I'm not proposing that Docus needs to add first-class configuration for every AI SDK provider.
An explicit way to enable the assistant without Gateway authentication would be enough to support custom provider implementations while keeping the current Gateway experience as the default.