fix(config): plan agent inherits model settings from prometheus when not explicitly configured
Previously, demoted plan agent only received { mode: 'subagent' } with no
model settings, causing fallback to step-3.5-flash. Now inherits all
model-related settings (model, variant, temperature, top_p, maxTokens,
thinking, reasoningEffort, textVerbosity, providerOptions) from the
resolved prometheus config. User overrides via agents.plan.* take priority.
Prompt, permission, description, and color are intentionally NOT inherited.
This commit is contained in:
@@ -32,6 +32,7 @@ import { AGENT_NAME_MAP } from "../shared/migration";
|
||||
import { AGENT_MODEL_REQUIREMENTS } from "../shared/model-requirements";
|
||||
import { PROMETHEUS_SYSTEM_PROMPT, PROMETHEUS_PERMISSION } from "../agents/prometheus";
|
||||
import { DEFAULT_CATEGORIES } from "../tools/delegate-task/constants";
|
||||
import { buildPlanDemoteConfig } from "./plan-model-inheritance";
|
||||
import type { ModelCacheState } from "../plugin-state";
|
||||
import type { CategoryConfig } from "../config/schema";
|
||||
|
||||
@@ -385,8 +386,10 @@ export function createConfigHandler(deps: ConfigHandlerDeps) {
|
||||
: {};
|
||||
|
||||
const planDemoteConfig = shouldDemotePlan
|
||||
? { mode: "subagent" as const
|
||||
}
|
||||
? buildPlanDemoteConfig(
|
||||
agentConfig["prometheus"] as Record<string, unknown> | undefined,
|
||||
pluginConfig.agents?.plan as Record<string, unknown> | undefined,
|
||||
)
|
||||
: undefined;
|
||||
|
||||
config.agent = {
|
||||
|
||||
Reference in New Issue
Block a user