Skip to content

Commit 44d90ad

Browse files
committed
Freebuff: call gemini pro as thinker often!
1 parent f95f9a5 commit 44d90ad

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

agents/base2/base2.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export function createBase2(
8787
isFree && 'code-reviewer-lite',
8888
isDefault && 'code-reviewer',
8989
isMax && 'code-reviewer-multi-prompt',
90+
isFree && 'thinker-gemini',
9091
'thinker-gpt',
9192
'context-pruner',
9293
),
@@ -142,6 +143,7 @@ Use the spawn_agents tool to spawn specialized agents to help you complete the u
142143
${buildArray(
143144
'- Spawn context-gathering agents (file pickers and web/docs researchers) before making edits. Use the code_search, list_directory, and glob tools directly for searching and exploring the codebase.',
144145
isFree && 'Do not spawn the thinker-gpt agent, unless the user asks. Not everyone has connected their ChatGPT subscription to Codebuff to allow for it.',
146+
isFree && 'You should spawn the thinker-gemini agent whenever you encounter a complex problem or the user asks you to think about a problem. This agent is extremely useful as it is very smart. You must take advantage of it and spawn it often!',
145147
isDefault &&
146148
'- Spawn the editor agent to implement the changes after you have gathered all the context you need.',
147149
(isDefault || isMax) &&
@@ -331,6 +333,8 @@ ${buildArray(
331333
'After getting context on the user request from the codebase or from research, use the ask_user tool to ask the user for important clarifications on their request or alternate implementation strategies. You should skip this step if the choice is obvious -- only ask the user if you need their help making the best choice.',
332334
(isDefault || isMax) &&
333335
`- For any task requiring 3+ steps, use the write_todos tool to write out your step-by-step implementation plan. Include ALL of the applicable tasks in the list.${isFast ? '' : ' You should include a step to review the changes after you have implemented the changes.'}:${hasNoValidation ? '' : ' You should include at least one step to validate/test your changes: be specific about whether to typecheck, run tests, run lints, etc.'} You may be able to do reviewing and validation in parallel in the same step. Skip write_todos for simple tasks like quick edits or answering questions.`,
336+
isFree &&
337+
`- For complex problems, spawn the thinker-gemini agent to help find the best solution. This agent is extremely useful as it is very smart. You must take advantage of it and spawn it often!`,
334338
(isDefault || isMax) &&
335339
`- For quick problems, briefly explain your reasoning to the user. If you need to think longer, write your thoughts within the <think> tags. Finally, for complex problems, spawn the thinker agent to help find the best solution. (gpt-5-agent is a last resort for complex problems)`,
336340
isDefault &&

agents/thinker/thinker-gemini.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import thinker from './thinker'
2+
3+
import type { SecretAgentDefinition } from '../types/secret-agent-definition'
4+
5+
const definition: SecretAgentDefinition = {
6+
...thinker,
7+
id: 'thinker-gemini',
8+
model: 'google/gemini-3.1-pro-preview',
9+
providerOptions: undefined,
10+
outputSchema: undefined,
11+
outputMode: 'last_message',
12+
inheritParentSystemPrompt: false,
13+
instructionsPrompt: `You are the thinker-gemini agent. Think deeply about the user request and when satisfied, write out your response.
14+
15+
The parent agent will see your response. DO NOT call any tools. No need to spawn the thinker agent, because you are already the thinker agent. Just do the thinking work now.`,
16+
handleSteps: function* () {
17+
yield 'STEP'
18+
},
19+
}
20+
21+
export default definition

agents/thinker/thinker-gpt.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const definition: SecretAgentDefinition = {
66
...thinker,
77
id: 'thinker-gpt',
88
model: 'openai/gpt-5.4',
9+
providerOptions: undefined,
910
outputSchema: undefined,
1011
outputMode: 'last_message',
1112
inheritParentSystemPrompt: false,

0 commit comments

Comments
 (0)