You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Provide a detailed prompt for continuing our conversation above. Focus on information that would be helpful for continuing the conversation, including what we did, what we're doing, which files we're working on, and what we're going to do next considering new session will not have access to our conversation."
149
+
constdefaultPrompt=`Provide a detailed prompt for continuing our conversation above.
150
+
Focus on information that would be helpful for continuing the conversation, including what we did, what we're doing, which files we're working on, and what we're going to do next.
151
+
The summary that you construct will be used so that another agent can read it and continue the work.
152
+
153
+
When constructing the summary, try to stick to this template:
154
+
---
155
+
## Goal
156
+
157
+
[What goal(s) is the user trying to accomplish?]
158
+
159
+
## Instructions
160
+
161
+
- [What important instructions did the user give you that are relevant]
162
+
- [If there is a plan or spec, include information about it so next agent can continue using it]
163
+
164
+
## Discoveries
165
+
166
+
[What notable things were learned during this conversation that would be useful for the next agent to know when continuing the work]
167
+
168
+
## Accomplished
169
+
170
+
[What work has been completed, what work is still in progress, and what work is left?]
171
+
172
+
## Relevant files / directories
173
+
174
+
[Construct a structured list of relevant files that have been read, edited, or created that pertain to the task at hand. If all the files in a directory are relevant, include the path to the directory.]
// OpenRouter provides inputTokens as the total count of input tokens (including cached).
467
+
// AFAIK other providers (OpenRouter/OpenAI/Gemini etc.) do it the same way e.g. vercel/ai#8794 (comment)
468
+
// Anthropic does it differently though - inputTokens doesn't include cached tokens.
469
+
// It looks like OpenCode's cost calculation assumes all providers return inputTokens the same way Anthropic does (I'm guessing getUsage logic was originally implemented with anthropic), so it's causing incorrect cost calculation for OpenRouter and others.
0 commit comments