---
title: "更新模型"
method: PUT
path: "/models/{id}"
tags: ["模型管理"]
---

# 更新模型

`PUT /models/{id}`

更新模型配置信息

## Path parameters

- `id` string, required

## Request body

- InternalHandlerUpdateModelRequest
  - `description` string
  - `display_name` string
  - `name` string
  - `parameters` GithubComTencentWeKnoraInternalTypesModelParameters
    - `api_key` string
    - `app_id` string — WeKnoraCloud 厂商专用凭证
    - `app_secret` string — AES-256 加密存储，实际承载上游 API Key
    - `base_url` string
    - `custom_headers` object — CustomHeaders 允许在调用远程模型 API 时附加自定义 HTTP 请求头， 用途类似 Python OpenAI SDK 的 extra_headers 参数， 常见场景包括透传企业网关鉴权信息、追踪 ID、路由标识等。 保留字段（Authorization、api-key、Content-Type、Accept 等）会在运行期被忽略以避免破坏签名/鉴权流程。
    - `embedding_parameters` GithubComTencentWeKnoraInternalTypesEmbeddingParameters
      - `dimension` integer
      - `supports_dimension_override` boolean
      - `truncate_prompt_tokens` integer
    - `extra_config` object — Provider-specific configuration
    - `interface_type` string
    - `max_concurrency` integer — MaxConcurrency caps concurrent in-flight BACKGROUND (ingestion / enrichment) calls to THIS specific model, keyed by model ID and shared across all replicas. 0 (the default) means "fall back to the process-wide model.max_concurrency". Interactive user-facing calls are never gated. Only chat / vlm / embedding honour this (see limiter.Gate).
    - `parameter_size` string — Ollama model parameter size (e.g., "7B", "13B", "70B")
    - `provider` string — Provider identifier: openai, aliyun, zhipu, generic
    - `supports_vision` boolean — Whether the model accepts image/multimodal input
  - `source` 'local' | 'remote' | 'aliyun' | 'zhipu' | 'volcengine' | 'deepseek' | 'hunyuan' | 'minimax' | 'openai' | 'gemini' | 'mimo' | 'siliconflow' | 'jina' | 'openrouter' | 'requesty' | 'nvidia' | 'novita' | 'azure_openai'
  - `type` 'Embedding' | 'Rerank' | 'KnowledgeQA' | 'VLLM' | 'ASR'

## Response `200`

更新后的模型

- object

## Other responses

- `404` — 模型不存在

---

[API](https://skmtc.net/tencentblueking/apis/weknora-api.md) · [All operations](https://skmtc.net/tencentblueking/apis/weknora-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tencentblueking/weknora-api/versions/d6921ae22ce0/schema)
