tweak: tell the model what model it is in environment section of prompt

This commit is contained in:
Aiden Cline
2026-01-24 12:10:15 -05:00
parent 077d17d433
commit 88bcd04659
2 changed files with 3 additions and 2 deletions

View File

@@ -598,7 +598,7 @@ export namespace SessionPrompt {
agent,
abort,
sessionID,
system: [...(await SystemPrompt.environment()), ...(await SystemPrompt.custom())],
system: [...(await SystemPrompt.environment(model)), ...(await SystemPrompt.custom())],
messages: [
...MessageV2.toModelMessages(sessionMessages, model),
...(isLastStep

View File

@@ -52,10 +52,11 @@ export namespace SystemPrompt {
return [PROMPT_ANTHROPIC_WITHOUT_TODO]
}
export async function environment() {
export async function environment(model: Provider.Model) {
const project = Instance.project
return [
[
`You are powered by the model named ${model.api.id}. The exact model ID is ${model.providerID}/${model.api.id}`,
`Here is some useful information about the environment you are running in:`,
`<env>`,
` Working directory: ${Instance.directory}`,