feat(号池): 支持账号批量配置与可用模型管理#672
Merged
fawney19 merged 6 commits intoJul 19, 2026
Merged
Conversation
MMEXA
marked this pull request as draft
July 13, 2026 21:46
ZipperCode
added a commit
to ZipperCode/Aether
that referenced
this pull request
Jul 14, 2026
…anagement-20260714 # Conflicts: # apps/aether-gateway/src/handlers/admin/request/provider/tasks.rs # frontend/src/api/endpoints/pool.ts
…anagement-20260714
MMEXA
marked this pull request as ready for review
July 16, 2026 16:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
功能范围
api_key、auth_config、auth_type、账号名称等身份与凭据字段由单账号编辑负责,避免把同一身份信息写入多个账号。模型配置语义
自动模型发现与可用模型范围是两项独立配置:
*、?通配符,匹配不区分大小写。locked_models。自动获取模型时,锁定集合用于保留人工确认的模型范围。auto_fetch_models: false,不会清空模型范围、锁定集合或筛选规则。模型选择器聚合以下来源:
模型列表支持搜索,并可按当前搜索结果批量选择。
管理接口
请求体示例:
{ "key_ids": ["key-a", "key-b"], "patch": { "api_formats": ["openai:responses"], "internal_priority": 10, "auto_fetch_models": true, "model_include_patterns": ["gpt-*"], "model_exclude_patterns": ["*-preview"], "allowed_models": ["gpt-5.6-sol", "gpt-5.6-luna"], "locked_models": ["gpt-5.6-sol", "gpt-5.6-luna"] } }接口行为:
key_ids统一去重并校验 Provider 归属;空集合、未知账号或跨 Provider 账号在写入前返回错误。patch只接受可共享的账号配置字段。模型发现链路
/api/admin/provider-query/models接受api_key_ids,模型发现范围限定为所选账号集合。持久化与运行态
ProviderCatalogWriteRepository提供集合更新契约,内存、PostgreSQL、SQLite 与 MySQL 实现保持一致。auto_fetch_models、locked_models、model_include_patterns与model_exclude_patterns,各数据后端使用一致的模型配置语义。UI 与交互
设计依据
build_admin_update_provider_key_record_with_existing_keys作为字段校验入口,批量接口只负责目标集合、补丁边界和事务编排。resolvePoolKeySelection,分页、筛选与全选只保留一套解释规则。合并依赖
#669→#672。#669提供 Gateway 测试辅助函数作用域和 effective-token 统计语义;#672的 Rust CI 基于main合并树运行,相关 Gateway Clippy 与统计测试依赖该提交。#669合并后更新#672基线并执行完整 CI 矩阵。验证
cargo fmt --all -- --checkcargo check -p aether-gatewaycargo clippy -p aether-data -p aether-gateway --lib --tests -- -D warningscargo test -p aether-data sqlite_repository_writes_provider_catalog_contract_views -- --nocapturenpm run type-checknpm run build