This uses Gemini's native [thinking summaries](https://cloud.google.com/vertex-ai/generative-ai/docs/thinking#thought-summaries) which were recently added to the API. Why? The grafted thinking would sometimes cause weird issues where the model, especially Gemini 2.5 Flash, got confused and put dyad tags like `<dyad-write>` inside the `<think>` tags. This also improves the UX because you can see the native thoughts rather than having the Gemini response load for a while without any feedback. I tried adding Anthropic extended thinking, however it requires temp to be set at 1, which isn't ideal for Dyad's use case where we need precise syntax following.
96 lines
3.6 KiB
Plaintext
96 lines
3.6 KiB
Plaintext
{
|
|
"body": {
|
|
"model": "gemini/gemini-2.5-pro-preview-05-06",
|
|
"max_tokens": 65535,
|
|
"temperature": 0,
|
|
"messages": [
|
|
{
|
|
"role": "system",
|
|
"content": "[[SYSTEM_MESSAGE]]"
|
|
},
|
|
{
|
|
"role": "user",
|
|
"content": "[dump]"
|
|
}
|
|
],
|
|
"stream": true,
|
|
"thinking": {
|
|
"type": "enabled",
|
|
"include_thoughts": true
|
|
},
|
|
"dyad_options": {
|
|
"files": [
|
|
{
|
|
"path": "a.ts",
|
|
"content": "// a.ts\n",
|
|
"force": true
|
|
},
|
|
{
|
|
"path": "AI_RULES.md",
|
|
"content": "# AI_RULES.md\n",
|
|
"force": false
|
|
},
|
|
{
|
|
"path": "exclude/exclude.ts",
|
|
"content": "// exclude.ts: this file is not in any of the globs\n",
|
|
"force": false
|
|
},
|
|
{
|
|
"path": "exclude/exclude.tsx",
|
|
"content": "// exclude.tsx: this file is not in any of the globs\n",
|
|
"force": false
|
|
},
|
|
{
|
|
"path": "manual/file.ts",
|
|
"content": "",
|
|
"force": true
|
|
},
|
|
{
|
|
"path": "manual/sub-manual/sub-manual.js",
|
|
"content": "",
|
|
"force": true
|
|
},
|
|
{
|
|
"path": "src/components/ui/button.tsx",
|
|
"content": "// Contents omitted for brevity",
|
|
"force": false
|
|
},
|
|
{
|
|
"path": "src/components/ui/helper.ts",
|
|
"content": "// Contents omitted for brevity",
|
|
"force": false
|
|
},
|
|
{
|
|
"path": "src/dir/some.css",
|
|
"content": "/* some.css */\n",
|
|
"force": false
|
|
},
|
|
{
|
|
"path": "src/foo.ts",
|
|
"content": "// foo.ts\n",
|
|
"force": false
|
|
},
|
|
{
|
|
"path": "src/sub/sub1.ts",
|
|
"content": "// sub/sub1.ts\n",
|
|
"force": false
|
|
},
|
|
{
|
|
"path": "src/sub/sub2.tsx",
|
|
"content": "// sub/sub2.tsx\n",
|
|
"force": false
|
|
},
|
|
{
|
|
"path": "src/very-large-file.ts",
|
|
"content": "// very-large-file.ts\n\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n",
|
|
"force": false
|
|
}
|
|
],
|
|
"enable_lazy_edits": true,
|
|
"enable_smart_files_context": true
|
|
}
|
|
},
|
|
"headers": {
|
|
"authorization": "Bearer testdyadkey"
|
|
}
|
|
} |