chore(merge): 整合最新 main 与统一认证变更
ci / verify (pull_request) Successful in 12m18s
ci / verify (pull_request) Successful in 12m18s
合并远端生产 CI、依赖与 API 文档改动,保留统一认证和 SSF 能力。由于远端生产基线已占用 0062,将尚未发布的身份迁移整理为 0063 至 0068 的最终增量 Schema,移除仅用于开发期草稿升级的破坏性迁移步骤。 验证:go test ./...。其余生产门禁在合并提交后继续执行。
This commit is contained in:
+308
-73
@@ -133,6 +133,118 @@ definitions:
|
||||
usage:
|
||||
$ref: '#/definitions/httpapi.ChatCompletionUsage'
|
||||
type: object
|
||||
httpapi.ChatCompletionRequest:
|
||||
properties:
|
||||
audio:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
frequency_penalty:
|
||||
example: 0
|
||||
type: number
|
||||
function_call: {}
|
||||
functions:
|
||||
items:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
type: array
|
||||
logit_bias:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
logprobs:
|
||||
type: boolean
|
||||
max_completion_tokens:
|
||||
example: 512
|
||||
type: integer
|
||||
max_tokens:
|
||||
example: 512
|
||||
type: integer
|
||||
messages:
|
||||
items:
|
||||
$ref: '#/definitions/httpapi.ChatMessage'
|
||||
type: array
|
||||
metadata:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
modalities:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
model:
|
||||
example: gpt-4o-mini
|
||||
type: string
|
||||
moderation: {}
|
||||
"n":
|
||||
example: 1
|
||||
type: integer
|
||||
parallel_tool_calls:
|
||||
type: boolean
|
||||
prediction: {}
|
||||
presence_penalty:
|
||||
example: 0
|
||||
type: number
|
||||
prompt_cache_key:
|
||||
type: string
|
||||
prompt_cache_options:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
prompt_cache_retention:
|
||||
enum:
|
||||
- in_memory
|
||||
- 24h
|
||||
type: string
|
||||
reasoning_effort:
|
||||
description: ReasoningEffort 推理强度,OpenAI-compatible 请求字段;支持 none、minimal、low、medium、high、xhigh、max。供应商自定义取值由网关按平台适配。
|
||||
enum:
|
||||
- none
|
||||
- minimal
|
||||
- low
|
||||
- medium
|
||||
- high
|
||||
- xhigh
|
||||
- max
|
||||
example: medium
|
||||
type: string
|
||||
response_format: {}
|
||||
runMode:
|
||||
example: simulation
|
||||
type: string
|
||||
safety_identifier:
|
||||
type: string
|
||||
seed:
|
||||
type: integer
|
||||
service_tier:
|
||||
type: string
|
||||
stop: {}
|
||||
store:
|
||||
type: boolean
|
||||
stream:
|
||||
example: false
|
||||
type: boolean
|
||||
stream_options:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
temperature:
|
||||
example: 0.7
|
||||
type: number
|
||||
tool_choice: {}
|
||||
tools:
|
||||
items:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
type: array
|
||||
top_logprobs:
|
||||
type: integer
|
||||
top_p:
|
||||
example: 1
|
||||
type: number
|
||||
user:
|
||||
type: string
|
||||
verbosity:
|
||||
type: string
|
||||
web_search_options:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
type: object
|
||||
httpapi.ChatCompletionUsage:
|
||||
properties:
|
||||
completion_tokens:
|
||||
@@ -157,12 +269,16 @@ definitions:
|
||||
type: object
|
||||
httpapi.ChatMessage:
|
||||
properties:
|
||||
content:
|
||||
example: Hello
|
||||
content: {}
|
||||
function_call: {}
|
||||
name:
|
||||
type: string
|
||||
role:
|
||||
example: user
|
||||
type: string
|
||||
tool_call_id:
|
||||
type: string
|
||||
tool_calls: {}
|
||||
type: object
|
||||
httpapi.ChatPromptTokensDetails:
|
||||
properties:
|
||||
@@ -203,9 +319,13 @@ definitions:
|
||||
message:
|
||||
example: invalid json body
|
||||
type: string
|
||||
param: {}
|
||||
status:
|
||||
example: 400
|
||||
type: integer
|
||||
type:
|
||||
example: invalid_request_error
|
||||
type: string
|
||||
type: object
|
||||
httpapi.FileStorageChannelListResponse:
|
||||
properties:
|
||||
@@ -567,6 +687,18 @@ definitions:
|
||||
type: object
|
||||
httpapi.ResponsesRequest:
|
||||
properties:
|
||||
background:
|
||||
type: boolean
|
||||
context_management:
|
||||
items:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
type: array
|
||||
conversation: {}
|
||||
include:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
input: {}
|
||||
instructions:
|
||||
example: Answer concisely
|
||||
@@ -574,23 +706,47 @@ definitions:
|
||||
max_output_tokens:
|
||||
example: 512
|
||||
type: integer
|
||||
max_tool_calls:
|
||||
type: integer
|
||||
metadata:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
model:
|
||||
example: Doubao Seed 2.0 Pro
|
||||
type: string
|
||||
moderation: {}
|
||||
parallel_tool_calls:
|
||||
example: true
|
||||
type: boolean
|
||||
previous_response_id:
|
||||
example: resp_0123456789abcdef0123456789abcdef
|
||||
type: string
|
||||
prompt: {}
|
||||
prompt_cache_key:
|
||||
type: string
|
||||
prompt_cache_options:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
prompt_cache_retention:
|
||||
enum:
|
||||
- in_memory
|
||||
- 24h
|
||||
type: string
|
||||
reasoning:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
safety_identifier:
|
||||
type: string
|
||||
service_tier:
|
||||
type: string
|
||||
store:
|
||||
type: boolean
|
||||
stream:
|
||||
example: false
|
||||
type: boolean
|
||||
stream_options:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
temperature:
|
||||
example: 0.7
|
||||
type: number
|
||||
@@ -603,9 +759,15 @@ definitions:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
type: array
|
||||
top_logprobs:
|
||||
type: integer
|
||||
top_p:
|
||||
example: 1
|
||||
type: number
|
||||
truncation:
|
||||
type: string
|
||||
user:
|
||||
type: string
|
||||
type: object
|
||||
httpapi.RuntimePolicySetListResponse:
|
||||
properties:
|
||||
@@ -614,6 +776,36 @@ definitions:
|
||||
$ref: '#/definitions/store.RuntimePolicySet'
|
||||
type: array
|
||||
type: object
|
||||
httpapi.SkillBundleMetadataResponse:
|
||||
properties:
|
||||
apiDocsJsonPath:
|
||||
example: /api-docs-json
|
||||
type: string
|
||||
apiDocsYamlPath:
|
||||
example: /api-docs-yaml
|
||||
type: string
|
||||
displayName:
|
||||
example: AI Gateway 运维管理
|
||||
type: string
|
||||
downloadPath:
|
||||
example: /api/v1/public/skills/ai-gateway-ops-management/download
|
||||
type: string
|
||||
fileName:
|
||||
example: ai-gateway-ops-management-v1.0.2.zip
|
||||
type: string
|
||||
modules:
|
||||
example:
|
||||
- model-runtime
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
example: ai-gateway-ops-management
|
||||
type: string
|
||||
version:
|
||||
example: 1.0.2
|
||||
type: string
|
||||
type: object
|
||||
httpapi.TaskAcceptedResponse:
|
||||
properties:
|
||||
next:
|
||||
@@ -688,12 +880,17 @@ definitions:
|
||||
emotion:
|
||||
example: happy
|
||||
type: string
|
||||
input:
|
||||
example: Tell me a short story
|
||||
type: string
|
||||
input: {}
|
||||
makeInstrumental:
|
||||
example: false
|
||||
type: boolean
|
||||
max_completion_tokens:
|
||||
description: MaxCompletionTokens includes visible output and reasoning tokens.
|
||||
example: 512
|
||||
type: integer
|
||||
max_output_tokens:
|
||||
example: 512
|
||||
type: integer
|
||||
max_tokens:
|
||||
example: 512
|
||||
type: integer
|
||||
@@ -714,7 +911,15 @@ definitions:
|
||||
example: A watercolor robot reading a book
|
||||
type: string
|
||||
reasoning_effort:
|
||||
description: ReasoningEffort 推理强度,OpenAI-compatible 请求字段;仅支持 none、minimal、low、medium、high、xhigh。供应商自定义取值由网关按平台适配。
|
||||
description: ReasoningEffort 推理强度,OpenAI-compatible 请求字段;支持 none、minimal、low、medium、high、xhigh、max。供应商自定义取值由网关按平台适配。
|
||||
enum:
|
||||
- none
|
||||
- minimal
|
||||
- low
|
||||
- medium
|
||||
- high
|
||||
- xhigh
|
||||
- max
|
||||
example: medium
|
||||
type: string
|
||||
resolution:
|
||||
@@ -2778,6 +2983,33 @@ info:
|
||||
title: EasyAI AI Gateway API
|
||||
version: 0.1.0
|
||||
paths:
|
||||
/api-docs-json:
|
||||
get:
|
||||
description: 返回当前构建内嵌的完整机器可读 Swagger JSON,供 Agent 在 SKILL references 未覆盖接口时查询。
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
summary: 获取 AI Gateway Swagger JSON
|
||||
tags:
|
||||
- agent-resources
|
||||
/api-docs-yaml:
|
||||
get:
|
||||
description: 返回当前构建内嵌的完整机器可读 Swagger YAML。
|
||||
produces:
|
||||
- application/yaml
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
type: string
|
||||
summary: 获取 AI Gateway Swagger YAML
|
||||
tags:
|
||||
- agent-resources
|
||||
/api/admin/access-rules:
|
||||
get:
|
||||
description: 管理端返回用户组、租户、用户或 API Key 到平台、平台模型、基础模型的访问规则。
|
||||
@@ -6117,7 +6349,7 @@ paths:
|
||||
name: input
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.TaskRequest'
|
||||
$ref: '#/definitions/httpapi.ChatCompletionRequest'
|
||||
produces:
|
||||
- application/json
|
||||
- text/event-stream
|
||||
@@ -6678,6 +6910,40 @@ paths:
|
||||
summary: 获取公开统一认证状态
|
||||
tags:
|
||||
- identity
|
||||
/api/v1/public/skills/ai-gateway-ops-management/download:
|
||||
get:
|
||||
description: 下载可交给 Agent 使用的 ai-gateway-ops-management ZIP 包。
|
||||
produces:
|
||||
- application/zip
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
type: file
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
summary: 下载 AI Gateway 运维管理 SKILL
|
||||
tags:
|
||||
- agent-resources
|
||||
/api/v1/public/skills/ai-gateway-ops-management/metadata:
|
||||
get:
|
||||
description: 返回公开运维管理 SKILL 的名称、版本、模块、下载文件名和机器可读接口文档路径。
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.SkillBundleMetadataResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
summary: 获取 AI Gateway 运维管理 SKILL 元数据
|
||||
tags:
|
||||
- agent-resources
|
||||
/api/v1/reranks:
|
||||
post:
|
||||
consumes:
|
||||
@@ -6743,32 +7009,31 @@ paths:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 网关任务接口按 model 选择平台模型;除 /api/v1/chat/completions 以外的 /api/v1 任务路径返回任务受理结果,OpenAI-compatible
|
||||
路径同步返回兼容响应或 SSE 流。
|
||||
description: 公开 OpenAI-compatible Responses 入口。模型声明 openai_responses 时原生转发,否则使用
|
||||
Chat Completions 转换;store 缺省为 true。previous_response_id 严格绑定首次成功的平台模型和上游协议,链路不可用时不跨平台续接。未提供
|
||||
previous_response_id 时由调用方管理完整状态,Gateway 以本轮 input/messages 为准且不追加本地历史。
|
||||
parameters:
|
||||
- description: true 时异步创建任务并返回 202
|
||||
in: header
|
||||
name: X-Async
|
||||
type: boolean
|
||||
- description: AI 任务请求,字段随任务类型变化
|
||||
- description: Responses 请求;Chat 回退只支持自定义 function tools
|
||||
in: body
|
||||
name: input
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.TaskRequest'
|
||||
$ref: '#/definitions/httpapi.ResponsesRequest'
|
||||
produces:
|
||||
- application/json
|
||||
- text/event-stream
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
headers:
|
||||
X-Gateway-Task-Id:
|
||||
description: 网关审计任务 ID
|
||||
type: string
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.CompatibleResponse'
|
||||
"202":
|
||||
description: Accepted
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.TaskAcceptedResponse'
|
||||
$ref: '#/definitions/httpapi.ResponsesCompatibleResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
description: invalid_previous_response_id / unsupported_response_tool /
|
||||
unsupported_response_parameter
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
"401":
|
||||
@@ -6783,23 +7048,15 @@ paths:
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
"429":
|
||||
description: Too Many Requests
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
"502":
|
||||
description: Bad Gateway
|
||||
"503":
|
||||
description: response_chain_unavailable
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 创建或执行 AI 任务
|
||||
summary: 创建 OpenAI Responses
|
||||
tags:
|
||||
- tasks
|
||||
- responses
|
||||
/api/v1/security-events/ssf:
|
||||
post:
|
||||
consumes:
|
||||
@@ -7714,32 +7971,25 @@ paths:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 网关任务接口按 model 选择平台模型;除 /api/v1/chat/completions 以外的 /api/v1 任务路径返回任务受理结果,OpenAI-compatible
|
||||
路径同步返回兼容响应或 SSE 流。
|
||||
description: OpenAI-compatible Chat Completions 入口;仅接受官方字段及文档声明的 EasyAI 路由扩展,未知顶层字段返回
|
||||
400 invalid_parameter。
|
||||
parameters:
|
||||
- description: true 时异步创建任务并返回 202
|
||||
in: header
|
||||
name: X-Async
|
||||
type: boolean
|
||||
- description: AI 任务请求,字段随任务类型变化
|
||||
- description: Chat Completions 请求
|
||||
in: body
|
||||
name: input
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.TaskRequest'
|
||||
$ref: '#/definitions/httpapi.ChatCompletionRequest'
|
||||
produces:
|
||||
- application/json
|
||||
- text/event-stream
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.CompatibleResponse'
|
||||
"202":
|
||||
description: Accepted
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.TaskAcceptedResponse'
|
||||
$ref: '#/definitions/httpapi.ChatCompletionCompatibleResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
description: invalid_parameter
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
"401":
|
||||
@@ -7754,10 +8004,6 @@ paths:
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
"429":
|
||||
description: Too Many Requests
|
||||
schema:
|
||||
@@ -7768,9 +8014,9 @@ paths:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 创建或执行 AI 任务
|
||||
summary: 创建 OpenAI Chat Completions
|
||||
tags:
|
||||
- tasks
|
||||
- chat
|
||||
/embeddings:
|
||||
post:
|
||||
consumes:
|
||||
@@ -8553,32 +8799,25 @@ paths:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 网关任务接口按 model 选择平台模型;除 /api/v1/chat/completions 以外的 /api/v1 任务路径返回任务受理结果,OpenAI-compatible
|
||||
路径同步返回兼容响应或 SSE 流。
|
||||
description: OpenAI-compatible Chat Completions 入口;仅接受官方字段及文档声明的 EasyAI 路由扩展,未知顶层字段返回
|
||||
400 invalid_parameter。
|
||||
parameters:
|
||||
- description: true 时异步创建任务并返回 202
|
||||
in: header
|
||||
name: X-Async
|
||||
type: boolean
|
||||
- description: AI 任务请求,字段随任务类型变化
|
||||
- description: Chat Completions 请求
|
||||
in: body
|
||||
name: input
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.TaskRequest'
|
||||
$ref: '#/definitions/httpapi.ChatCompletionRequest'
|
||||
produces:
|
||||
- application/json
|
||||
- text/event-stream
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.CompatibleResponse'
|
||||
"202":
|
||||
description: Accepted
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.TaskAcceptedResponse'
|
||||
$ref: '#/definitions/httpapi.ChatCompletionCompatibleResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
description: invalid_parameter
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
"401":
|
||||
@@ -8593,10 +8832,6 @@ paths:
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
"429":
|
||||
description: Too Many Requests
|
||||
schema:
|
||||
@@ -8607,9 +8842,9 @@ paths:
|
||||
$ref: '#/definitions/httpapi.ErrorEnvelope'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 创建或执行 AI 任务
|
||||
summary: 创建 OpenAI Chat Completions
|
||||
tags:
|
||||
- tasks
|
||||
- chat
|
||||
/v1/embeddings:
|
||||
post:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user