Files
sam bf33ec9535 refactor(agentrun): agent stage contract moves to the domain layer
internal/domain/workflow imported internal/agentexec for its protocol types,
pulling the AI runtime into every binary that touches workflow types. The
request, result and runner contract now live in internal/domain/agentrun;
agentexec keeps the runtime. The model catalog cache moves from servicekit
into modelcatalog and WaitForPeer into staterpc, so archie-state-store and
archie-messaging no longer link the AI runtime.
2026-10-04 01:33:00 +10:00

18 lines
654 B
Go

package agentexec
import (
"github.com/samcharles93/archie-core/internal/config"
"github.com/samcharles93/archie-core/internal/domain/agentrun"
)
// ProvidersFromConfig converts the daemon's configured LLM providers into
// the wire-safe Provider map sent to an agent runner. It carries only
// class/env-var-name/base-URL -- never the resolved API key.
func ProvidersFromConfig(providers map[string]config.Provider) map[string]agentrun.Provider {
out := make(map[string]agentrun.Provider, len(providers))
for name, p := range providers {
out[name] = agentrun.Provider{Class: p.Class, APIKeyEnv: p.APIKeyEnv, BaseURL: p.BaseURL}
}
return out
}