feat(agents): resolve unique advertised model variations (#3472)

This commit is contained in:
Carlos Florêncio
2026-09-07 19:23:17 +01:00
committed by GitHub
parent 410a274629
commit cb1ffd0f58
46 changed files with 1676 additions and 59 deletions
@@ -42,6 +42,23 @@ describe("StatusMessage model selection warnings", () => {
expect(screen.getByText("Check the agent version in the executor.")).toBeTruthy();
expect(screen.getByText("The saved model was not advertised by the executor.")).toBeTruthy();
});
it("explains when the executor applied the only advertised variation", () => {
const comment = modelSelectionWarningMessage();
comment.metadata = {
...comment.metadata,
reason: "unique_variation_applied",
effective_model: "opus[1m]",
fallback_model: undefined,
};
render(<StatusMessage comment={comment} />);
expect(
screen.getByText("The executor applied the only advertised variation of the saved model."),
).toBeTruthy();
expect(screen.queryByText(/fallback model/i)).toBeNull();
});
});
describe("StatusMessage branch replacement warnings", () => {
@@ -180,6 +180,7 @@ function modelSelectionReasonLabel(reason: string | undefined): string {
const keyByReason: Record<string, string> = {
requested_not_advertised: "task:modelSelectionReasonRequestedNotAdvertised",
fallback_not_advertised: "task:modelSelectionReasonFallbackNotAdvertised",
unique_variation_applied: "task:modelSelectionReasonUniqueVariation",
catalog_empty: "task:modelSelectionReasonCatalogEmpty",
selection_unsupported: "task:modelSelectionReasonUnsupported",
selection_failed_auto_fallback: "task:modelSelectionReasonAutoFallback",