Address cheap model PR review feedback

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-04-30 14:22:03 -05:00
1 parent 225b06e01f
commit e30bf39914
4 files changed
+10 -12

No files matched your search

+6 -9
View File
@@ -13,6 +13,10 @@ import type {
Approval,
AgentConfigRevision,
} from "@paperclipai/shared";
import type {
AdapterModelProfileDefinition,
AdapterModelProfileKey,
} from "@paperclipai/adapter-utils";
import { isUuidLike, normalizeAgentUrlKey } from "@paperclipai/shared";
import { ApiError, api } from "./client";
@@ -28,15 +32,8 @@ export interface AdapterModel {
label: string;
}
export type AdapterModelProfileKey = "cheap";
export interface AdapterModelProfile {
key: AdapterModelProfileKey;
label: string;
description?: string;
adapterConfig: Record<string, unknown>;
source?: "adapter_default" | "discovered";
}
export type { AdapterModelProfileKey };
export type AdapterModelProfile = AdapterModelProfileDefinition;
export interface DetectedAdapterModel {
model: string;
+2 -2
View File
@@ -451,7 +451,7 @@ describe("IssueRunLedger", () => {
resultJson: {
modelProfile: {
requested: "cheap",
applied: "primary",
applied: null,
configSource: null,
fallbackReason: "agent_runtime_profile_disabled",
},
@@ -461,7 +461,7 @@ describe("IssueRunLedger", () => {
});
expect(container.textContent).toContain("Profile: cheap");
expect(container.textContent).toContain("Profile: cheap → primary");
expect(container.textContent).toContain("Profile: cheap (unavailable)");
expect(container.textContent).toContain("Cheap profile fell back to primary");
expect(container.textContent).toContain("agent_runtime_profile_disabled");
});
@@ -37,6 +37,7 @@ describe("buildNewAgentRuntimeConfig", () => {
heartbeatEnabled: true,
intervalSec: 600,
cheapModel: "claude-sonnet-4-6",
cheapModelEnabled: true,
});
expect(config.modelProfiles).toEqual({
+1 -1
View File
@@ -18,7 +18,7 @@ export function buildNewAgentRuntimeConfig(input?: {
};
const cheapModel = input?.cheapModel?.trim() ?? "";
const cheapEnabled = input?.cheapModelEnabled !== false;
const cheapEnabled = input?.cheapModelEnabled ?? false;
if (cheapModel && cheapEnabled) {
config.modelProfiles = {
cheap: {