mirror of
https://github.com/THU-MAIC/OpenMAIC.git
synced 2026-10-29 00:46:40 +08:00
Providers configured with server credentials only send model ids the deployment authorizes (explicit model list plus default/fallback/slot references for the capability); anything else gets the same HTTP 403 before the provider is contacted. Covers chat, verification, media, speech, transcription, model-based search, generation, agent, PBL, quiz grading and workspace assignments. Breaking change: credentialed providers without a model list accept only their default/fallback models. Co-authored-by: I3ob0 <huzi0404@163.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
123 lines
4.7 KiB
YAML
123 lines
4.7 KiB
YAML
# =============================================================================
|
|
# openmaic.yml: the model configuration of an OpenMAIC deployment
|
|
#
|
|
# Copy this file to openmaic.yml in the directory the server starts in (the
|
|
# repository root; /app in the Docker image), or point OPENMAIC_CONFIG at it,
|
|
# then restart the server. The file is read once at startup.
|
|
#
|
|
# As shipped, it needs one key: set OPENAI_API_KEY in .env.local (or change
|
|
# the provider below to one you have a key for). The commented blocks are
|
|
# optional; uncomment the ones you want and set the variables they name.
|
|
#
|
|
# - providers: the accounts the server can call.
|
|
# For every model capability, models is an authorization allowlist, not just a picker list.
|
|
# Deployment slot models and fallbacks for that capability are also authorized.
|
|
# Provider-only media slots authorize only their single adapter default.
|
|
# Set models for each provider with credentials; restart after changes.
|
|
# A provider with neither has no authorized models. SDK catalogues and
|
|
# workspace assignments never grant access to additional server-paid models.
|
|
# These rules also apply to connection tests. With legacy configuration,
|
|
# use <PREFIX>_MODELS and/or DEFAULT_MODEL / MODEL_FALLBACK.
|
|
# - slots: which provider and model each use of AI gets by default. Users
|
|
# may change them in the model settings; slots left out are theirs to set.
|
|
# - lock: the slots fixed for everyone, each with its whole subtree.
|
|
# - allowUserKeys: whether users may add providers and keys of their own.
|
|
#
|
|
# Secrets stay in the environment (.env.local, a Docker or Kubernetes secret)
|
|
# and are referenced as ${VAR}. An unset variable, an unknown preset or slot,
|
|
# or a reference to an undeclared provider stops the server at startup with
|
|
# the exact location of the problem.
|
|
#
|
|
# Full reference: packages/docs/content/docs/configuration.mdx
|
|
# =============================================================================
|
|
|
|
providers:
|
|
# A provider id (the key) is lowercase letters, digits and dashes. Slots
|
|
# refer to models as "<provider id>:<model id>".
|
|
openai:
|
|
preset: openai
|
|
apiKey: ${OPENAI_API_KEY}
|
|
models: [gpt-5.5]
|
|
|
|
# --- Optional providers ----------------------------------------------------
|
|
|
|
# Another chat vendor.
|
|
# anthropic:
|
|
# preset: anthropic
|
|
# apiKey: ${ANTHROPIC_API_KEY}
|
|
|
|
# Web search.
|
|
# tavily:
|
|
# preset: tavily
|
|
# apiKey: ${TAVILY_API_KEY}
|
|
|
|
# Most presets cover one capability: OpenAI images are a second provider
|
|
# with the openai-image preset (the same key works).
|
|
# openai-image:
|
|
# preset: openai-image
|
|
# apiKey: ${OPENAI_API_KEY}
|
|
|
|
# Zhipu GLM CogView image generation:
|
|
# glm-image:
|
|
# preset: glm-image
|
|
# apiKey: ${IMAGE_GLM_API_KEY}
|
|
|
|
# A token plan covers several capabilities with one key: chat, images,
|
|
# video, text to speech and web search for MiniMax.
|
|
# minimax:
|
|
# preset: minimax
|
|
# apiKey: ${MINIMAX_API_KEY}
|
|
|
|
# Any OpenAI-compatible server: baseUrl is required, and models lists what
|
|
# the web settings offer from it.
|
|
# local:
|
|
# preset: openai-compatible
|
|
# baseUrl: http://host.docker.internal:11434/v1
|
|
# models: [qwen3:8b]
|
|
|
|
# Services that authenticate with a key pair use credentials.
|
|
# alidocmind:
|
|
# preset: alidocmind
|
|
# credentials:
|
|
# accessKeyId: ${ALIDOCMIND_ACCESS_KEY_ID}
|
|
# accessKeySecret: ${ALIDOCMIND_ACCESS_KEY_SECRET}
|
|
|
|
slots:
|
|
# The default chat model. Every chat slot without an assignment of its own
|
|
# follows it.
|
|
llm: openai:gpt-5.5
|
|
|
|
# --- Optional slots (each needs its provider above) -------------------------
|
|
|
|
# An object adds call parameters and a fallback model, tried once when the
|
|
# primary fails with a retryable error after its own retries. Fallbacks
|
|
# apply to language-model slots (llm and the slots below it) only.
|
|
# course.outline:
|
|
# model: anthropic:claude-sonnet-4-6
|
|
# fallback: openai:gpt-5.4-mini
|
|
|
|
# The Pro workbench agent needs a model with tool calling. It may set
|
|
# thinking.mode but not thinking.effort; an effort set on llm is dropped
|
|
# for the agent.
|
|
# agent:
|
|
# model: openai:gpt-5.5
|
|
# api: openai-completions
|
|
|
|
# A provider id alone means that provider's default model (search and
|
|
# document services mostly have none to pick).
|
|
# webSearch: tavily
|
|
# image: openai-image:gpt-image-2
|
|
# tts: minimax:speech-2.8-turbo
|
|
|
|
# null turns a capability off by default; users may still turn it on
|
|
# unless lock names it.
|
|
# video: null
|
|
|
|
# Slots fixed for everyone, with every slot below them ("lock: all" fixes
|
|
# every slot). Each must be written under slots above (null counts).
|
|
# lock: [video]
|
|
|
|
# false: users cannot add providers, keys or token plans; they only choose
|
|
# among the providers declared above, for the slots lock leaves open.
|
|
# allowUserKeys: true
|