feat: AGC 支持模型方案选择
新增 Router 模型目录接口并返回可用模型列表 客户端配置新增模型方案与当前选中方案字段 设置页新增模型方案卡片和管理弹层,支持方案名称、模型和推理强度 自定义下拉菜单圆角、遮罩层级与窗口边界定位,并隐藏滚动条 AGC 官方路由保留所选模型并携带客户端标记,由服务端校验后转发 补齐配置结构变更后的既有测试初始化字段
This commit is contained in:
@@ -5,7 +5,7 @@ use axum::{
|
||||
|
||||
use crate::{
|
||||
auth::require_bearer_auth,
|
||||
llm::{proxy_llm_chat_completions, proxy_llm_responses},
|
||||
llm::{list_llm_models, proxy_llm_chat_completions, proxy_llm_responses},
|
||||
state::AppState,
|
||||
volcengine_speech::{
|
||||
get_volcengine_speech_config, stream_volcengine_asr, stream_volcengine_tts_bidirection,
|
||||
@@ -15,6 +15,13 @@ use crate::{
|
||||
|
||||
pub fn router(state: AppState) -> Router<AppState> {
|
||||
Router::new()
|
||||
.route(
|
||||
"/api/llm/models",
|
||||
get(list_llm_models).route_layer(middleware::from_fn_with_state(
|
||||
state.clone(),
|
||||
require_bearer_auth,
|
||||
)),
|
||||
)
|
||||
.route(
|
||||
"/api/llm/chat/completions",
|
||||
post(proxy_llm_chat_completions).route_layer(middleware::from_fn_with_state(
|
||||
|
||||
Reference in New Issue
Block a user