Skip to content

feat(ui): add missing embedding model error page#1701

Merged
kapetr merged 3 commits intomainfrom
1673-ui-missing-model-error-state
Dec 11, 2025
Merged

feat(ui): add missing embedding model error page#1701
kapetr merged 3 commits intomainfrom
1673-ui-missing-model-error-state

Conversation

@kapetr
Copy link
Contributor

@kapetr kapetr commented Dec 10, 2025

Summary

Check the selected models against the actual agent demands, and provide an error message for a missing embedding model configuration, analogous to the existing error for a missing main model.

Linked Issues

Closes #1673

Documentation

  • No Docs Needed: a fix

Signed-off-by: Petr Kadlec <petr@puradesign.cz>
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 10, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @kapetr, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the user experience during local development by introducing a dedicated error page for missing embedding model configurations, aligning with the existing error handling for large language models. It refactors the A2A client setup for better organization and introduces a flexible error display component, ensuring users receive clear guidance when essential models are not configured.

Highlights

  • Embedding Model Error Page: Introduced a new error page specifically for cases where an embedding model is required but not configured, mirroring the existing LLM model error handling.
  • Refactored A2A Client Initialization: The logic for initializing the A2A client and its fetchImpl has been extracted into a new file, agent-card.ts, promoting better modularity and reusability.
  • Dynamic Model Selection Error Page: The NoModelSelectedErrorPage component was enhanced to dynamically display messages and setup commands for both LLM and embedding models, based on a new ModelType prop.
  • Centralized Model Check Logic: A new utility function, ensureModelSelected, was created to centralize the validation of required LLM and embedding models, returning an appropriate error UI if any are missing.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new feature to check for missing LLM or embedding model configurations and display a user-friendly error page. It also includes a good refactoring of the A2A client creation and error handling logic into a dedicated agent-card.ts file, improving modularity and reusability. The dynamic error messages for model selection are a nice touch for user experience.

Signed-off-by: Petr Kadlec <petr@puradesign.cz>
@kapetr kapetr requested a review from PetrBulanek December 10, 2025 13:27
Comment on lines 26 to 29
const { error } = await ensureModelSelected(providerId);
if (error) {
return error;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not necessary to change it, but I personally would find it a little clearer if it returned the component, like this:

const { ErrorComponent } = await ensureModelSelected(providerId);

if (ErrorComponent) {
    return <ErrorComponent />;
}

At least at first glance, it indicates that something is being rendered. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that, I was also struggling with this not being obvious.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 10, 2025
Signed-off-by: Petr Kadlec <petr@puradesign.cz>
@kapetr kapetr requested a review from PetrBulanek December 11, 2025 08:04
@kapetr kapetr merged commit 786d4dc into main Dec 11, 2025
8 checks passed
@kapetr kapetr deleted the 1673-ui-missing-model-error-state branch December 11, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI - Missing embedding model error state

2 participants