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
25 lines
691 B
TypeScript
25 lines
691 B
TypeScript
import type { AgentSettings } from "./agentSettings";
|
|
import type { AgentProvider } from "./agentSettings.providers";
|
|
import { resolveEnabledEnvForAgent } from "./agentEnv";
|
|
|
|
export function resolveAgentModel(
|
|
settings: AgentSettings,
|
|
provider: AgentProvider
|
|
): string | null {
|
|
if (!settings.customModelEnabledByProvider[provider]) {
|
|
return null;
|
|
}
|
|
|
|
const model = settings.customModelByProvider[provider].trim();
|
|
return model.length > 0 ? model : null;
|
|
}
|
|
|
|
export function resolveAgentLaunchEnv(
|
|
settings: AgentSettings,
|
|
provider: AgentProvider
|
|
): Record<string, string> {
|
|
return resolveEnabledEnvForAgent({
|
|
rows: settings.agentEnvByProvider[provider] ?? []
|
|
});
|
|
}
|