Currently switch model is a stand-alone endpoint so it needs to be integrated into /papers/search endpoint. And due to the nature of class-level field/method, the flow won't enter the switch process hence the service will still use the default model.
[ ] Integrate switch endpoint into search endpoint
[ ] Refactor the GeminiService and change fields/methods to instance-level
Model Switching: Successfully switched to gemini-1.5-pro during the proceed process, ensuring the correct model is used for searches.
Logging: Added logs to track model switching between gemini-1.5-pro and gemini-1.5-flash for better visibility.
Remaining Issue:
Instruction Box: Interaction via the instruction box still defaults to gemini-1.5-flash instead of gemini-1.5-pro.
Frontend Error: Encountered the error "Did not attempt to load JSON data because the request Content-Type was not 'application/json'." likely due to actions.ts or SearchForm.tsx, which may need further fixes.
Currently switch model is a stand-alone endpoint so it needs to be integrated into
/papers/search
endpoint. And due to the nature of class-level field/method, the flow won't enter the switch process hence the service will still use the default model.GeminiService
and change fields/methods to instance-level