I see this error for every prompt in the prototyper. Even for basic prompts like say “hello”. I couldn’t find a similar thread. Please let me know how to fix this.
Same happened for me today after clearing context as i did for last several days. I put my last 2 context entries back and it is resolved for now. I think new model is failing if context entries are all empty.
Hi @Sertac_Firat can you give more details for what you did please? I had cleared my context in the middle of the day. So It was not completely clear when this started happening
What happened here is we landed the first of a few fixes for long histories, but did not account for users who may have been working around this issue locally, i.e. by clearing their histories.
I have a fix ready for this, but it could be a few days before it rolls to prod.
In the meantime, the only option is to ensure a user and model turn are in the history. The safest way to do this is to create a new workspace, and to copy the structure of the context.json from the known good workspace. The other option is to try and do this manually, and in that case you want something like:
I opened up studio in my current project, started a new terminal, ran:
code /home/user/.idx/ai/capra-context-state.json
And then I had to actually rename the “capra-text-state.json” to “prototyper-context-state.json” instead. I went and followed the dev’s instructions on starting a new workspace. It’s not called capra-text-state.json anymore. So instead of using that in the command, try this in the new workspace:
I also had to make sure the old capra-text-state.json would fill in the correct information into the new prototyper. So I copied the file, pasted it into an ai model that works, pasted the prototyper context state from the new workspace in, and used this prompt with the “Tipsplit” example project:
My Firebase Studio project context for [INSERT YOUR PROJECT NAME] is showing placeholder data instead of actual project information. I have a working example from a TipSplit project that demonstrates the correct JSON structure with populated core features, UI guidelines, and agent histories. I need to update my project context to follow that same format.
{
"currentProposalObject":{
"appName":"SmartTracking",
"coreFeatures":[
{
"name":"Existing Project Core",
"description":"Details to be determined by codebase scan.",
"categories":[
"ui"
]
}
],
"uiStyleGuidelines":[
{
"category":"layout",
"description":"Awaiting codebase scan for details."
}
]
},
"agentHistories":{
"app-prototyping-agent: proposal-agent":[
{
"role":"user",
"content":[
{
"text":"I'm ready to work on your project. Please let me know what you'd like to do."
}
]
},
{
"role":"model",
"content":[
{
"text":"I'm ready to work on your project. Please let me know what you'd like to do."
}
]
}
],
"app-prototyping-agent: edit-app-agent":[
{
"role":"user",
"content":[
{
"text":"..."
}
]
},
{
"role":"model",
"content":[
{
"text":"..."
}
]
}
]
},
"currentState":"edit-app"
}
you can try adding an other model . the new 2.5 model is smarter then the basic model. Go to ai studio generte and api key for the project then add it to your project and select the LLM .
infirbase studio ther is a code view and a prototiper view.
go to code view
you will seee code and a preview onf your site . In an other tab next to the previw youwill vind geminie. Clivk on geminie.
At the bottum you can see the model used .Select gemenie 2.5 . It will wask for anapi key