mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-21 16:27:18 +02:00
Address cheap model PR review feedback
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
225b06e01f
commit
e30bf39914
4 files changed
+10
-12
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in new issue
Block a user