Repository navigation
fix(cap-provider-config): #452 API family 控件=服务端契约枚举单选下拉 - #11
Merged
Samuka007 merged 1 commit intoOct 7, 2026
Conversation
自由文本 Input+datalist 的建议值与服务端枚举脱节:面板建议 "anthropic" (relayApiValues 只认 anthropic-messages),模型行提交即 422 validation_failed;provider 行则落成 skip-with-warning 僵行。 - provider-config-queries: datalist 建议数组 → 两个 zod 枚举(各 seat 一源): modelApiFamilySchema = relayApiValues 三面(relayCatalogModelSchema.api); providerApiFamilySchema = 模型面 + openai-images(relayCatalogProviderSchema 的 union,get-bb#362 图像源族) - 控件:两处 family Input+datalist → 共享 ApiFamilySelect 单选下拉,选项即 schema.options;未选 = 无 api seat(服务端回退链管)。遗留 off-contract 值 显式呈为 "Out of contract · X" 项——不藏不吞,选中即替换 - 测试:Radix Select 在 jsdom 需 no-op hasPointerCapture/releasePointerCapture/ scrollIntoView 垫片(触发器 pointerdown 探测 + 内容挂载聚焦);新增四族下拉 断言、模型族三面断言(openai-images 会上 422,永不提供)、遗留值可见可换且 原样保存不静默改写
Samuka007
added a commit
to Samuka007/cloudflare-agent-project
that referenced
this pull request
Oct 7, 2026
…控件改契约枚举单选下拉 (#458) 自由文本 Input+datalist 建议值与服务端枚举脱节(建议 anthropic → 422 validation_failed)。bb 侧 PR Samuka007/bb#11:枚举单源(model 三面 + provider 四族含 openai-images)、ApiFamilySelect 单选下拉、遗留 off-contract 值显式保留可换;插件 22 测试全绿。
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.
cloudflare-agent-project#452。自由文本 Input+datalist 的建议值与服务端枚举脱节:面板建议
anthropic(服务端只认anthropic-messages等),模型行提交即 422 validation_failed;provider 行落成 skip-with-warning 僵行。修法
provider-config-queries.ts):datalist 建议数组删除,改为两个 zod 枚举,各 seat 一源、由派生保证不漂移:modelApiFamilySchema=anthropic-messages | openai-responses | openai-completions(=relayCatalogModelSchema.api=relayApiValues,packages/agent-do/src/provider-catalog.ts)providerApiFamilySchema= 模型面 +openai-images(=relayCatalogProviderSchema.api的 union,[codex] Fix sidebar new thread empty welcome get-bb/bb#362 图像源族)ConfiguredProviderSettingsSection.tsx):两处 family 自由文本 Input+datalist → 共享ApiFamilySelect单选下拉(shared-ui Select,host runtime radixSelect slot),选项即schema.options。未选 = wire 上无 api seat(服务端回退链:模型行→provider 行→anthropic-messages 默认)。遗留 off-contract 存量值显式呈为Out of contract · X项——不藏不吞,保存不静默改写,选中契约族即替换。@radix-ui/react-select@^2.3.3(shared-ui 同版;构建 runtime-shim 至宿主副本)。测试(22 pass,typecheck+eslint+bundle 构建全绿)
hasPointerCapture、内容挂载 scrollIntoView——补 no-op 后可真实驱动下拉