Files
agent-radar 2ed3415fb7
Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
源码快照 @ 2026-09-01 (source-only, 剔除非源码素材)
2026-09-01 20:17:27 +08:00

38 lines
1.4 KiB
Go

package providerregistry
// ResolveModelPlanProtocol returns the model API protocol declared by a
// migrated provider runtime. Providers without endpoint injection support are
// intentionally unresolved.
func ResolveModelPlanProtocol(value string) (ModelPlanProtocol, bool) {
index, ok := providerDescriptorIndex[normalize(value)]
if !ok {
return "", false
}
protocol := migratedDescriptors[index].Runtime.Endpoint.ModelPlanProtocol
return protocol, protocol != ""
}
// ResolveModelPlanModelAddressing returns the composer/settings addressing a
// migrated provider runtime declares for bound plan models. The empty value
// (raw plan model ids) resolves as unset.
func ResolveModelPlanModelAddressing(value string) (ModelPlanModelAddressing, bool) {
index, ok := providerDescriptorIndex[normalize(value)]
if !ok {
return "", false
}
addressing := migratedDescriptors[index].Runtime.Endpoint.ModelPlanModelAddressing
return addressing, addressing != ""
}
// ResolveModelPlanEndpointAdapter returns the transport adapter declared by a
// migrated provider runtime. Direct endpoint consumers intentionally resolve
// as unset.
func ResolveModelPlanEndpointAdapter(value string) (ModelPlanEndpointAdapter, bool) {
index, ok := providerDescriptorIndex[normalize(value)]
if !ok {
return "", false
}
adapter := migratedDescriptors[index].Runtime.Endpoint.ModelPlanEndpointAdapter
return adapter, adapter != ""
}