Skip to content

Improve Gemini and Claude AI feedback parsing and model refresh flow #311

@yczhangcc

Description

@yczhangcc

Description:
Gemini and Claude responses do not always match the same JSON response shape as ChatGPT/OpenAI. This can cause AI feedback parsing failures even when the provider API key and model are valid.

Problems:

  • OpenAI, Gemini, and Claude return model output in different response structures.
  • Gemini may include response parts, thought parts, or JSON text that needs to be extracted differently.
  • Claude returns content blocks instead of the OpenAI-style message content.
  • Some model responses include valid feedback wrapped in provider-specific formats.
  • The model selection UI says Fetch Models, but this action is better described as refreshing the current available model list.

Goal:
Make AI feedback generation more reliable across providers:

  • Parse OpenAI, Gemini, and Claude responses according to each provider’s response format.
  • Keep feedback output normalized into the same internal JSON structure.
  • Improve error handling when a provider returns invalid JSON.
  • Rename Fetch Models to Refresh Models in model selection UI.
  • Keep manual model refresh as a fallback when provider model lists change.

Expected result:
Gemini and Claude feedback should display successfully when they return valid feedback content, and model selection should use clearer Refresh Models wording.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions