coleam00 / bolt.new-any-llm

Prompt, run, edit, and deploy full-stack web applications using any LLM you want!
https://bolt.new
MIT License
3.93k stars 1.61k forks source link

[Bug]: Issues with "Enhance" Feature and "Respect Provider Choice from UI" After Latest Update #245

Closed champ2050 closed 2 days ago

champ2050 commented 1 week ago

Describe the bug

Description:
After updating the repository, two issues have surfaced:

  1. Enhance Feature Not Working
    When I type a prompt (e.g., to create a basic "Hello World" HTML page) and click "enhance," the prompt disappears, preventing further progress. This has occurred consistently across multiple attempts.

  2. Model Provider Changes on Project Reload
    When reopening older projects, I’ve noticed that the model provider setting does not persist. Instead, it defaults to a different model rather than the one I initially selected, which affects continuity and usability. Ideally, the model provider should remain as originally chosen for each project.

Actual Behavior:

Link to the Bolt URL that caused the error

http://localhost:5173/

Steps to reproduce

  1. Update the repository to the latest version (current as of two hours ago).
  2. In a virtual environment (not Docker), enter a prompt to create a simple HTML page.
  3. Click "enhance."
  4. Observe that the prompt disappears, and enhancement does not proceed.

To observe the model provider issue:

  1. Open any previous project where a specific model provider was chosen.
  2. Note that the model provider defaults to a different option rather than the one originally selected.

Expected behavior

Screen Recording / Screenshot

No response

Platform

Environment Details:

Additional context

Additional Information:

champ2050 commented 1 week ago

🎉 I can confirm that the Enhance Feature is working again, and the Respect Provider Choice option from the UI is also functioning perfectly now. Thank you, team, for all your hard work! 👏 Keep it up! 🚀

coleam00 commented 1 week ago

Fantastic, thank you @champ2050!

nandan121 commented 1 week ago

@champ2050 I pulled a few hours ago, and enhance prompt seems to have an issue

provider in enhancerAction() has provider: { name: 'OpenAILike', staticModels: [] },

The below hack works, I am sure it is better to be fixed by someone who knows what to do

async function enhancerAction({ context, request }: ActionFunctionArgs) { const { message, model, provider: originalProvider, apiKeys } = await request.json<{ message: string; model: string; provider: { name: string }; apiKeys?: Record<string, string>; }>();

// Extract provider.name and reassign to provider const provider = originalProvider.name;

champ2050 commented 6 days ago

@nandan121 true, I can see the error too now. @coleam00 seems after this latest update the "Prompt enhancer" shows this error msg: Invalid or missing provider hence reopening this.

nandan121 commented 5 days ago

@champ2050 , I tested fix by ali00209 (new_bolt6 branch). Enhance prompt works as expected

champ2050 commented 5 days ago

Alright, sweet! I think the guys should be adding the fixes here soon as well.

champ2050 commented 2 days ago

Enhance prompt working now tested, hence closing this.

coleam00 commented 18 hours ago

Thanks guys!