Skip to content

Use colored MiniMax provider icon, add Hailuo model icon, and fix MiniMax offering id#89

Merged
unliftedq merged 5 commits into
mainfrom
copilot/add-minimax-support
Jun 2, 2026
Merged

Use colored MiniMax provider icon, add Hailuo model icon, and fix MiniMax offering id#89
unliftedq merged 5 commits into
mainfrom
copilot/add-minimax-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 2, 2026

The MiniMax provider used the monochrome Lobehub icon, and Hailuo video models fell back to the MiniMax icon instead of their own brand mark.

Changes

  • MiniMax icon — replaced minimax.svg with the colored Lobehub variant (pink→orange gradient), used by both the provider entry and the minimax-image-01 model.
  • Hailuo icon — added colored hailuo.svg and resolved it for any model id containing hailuo (e.g. MiniMax-Hailuo-2.3), evaluated before the MiniMax fallback so the video model keeps its distinct brand mark while minimax-image-01 stays MiniMax.
if (modelId.toLowerCase().includes("hailuo")) {
  return { src: hailuoUrl, alt: "Hailuo" };
}
if (modelId.startsWith("minimax-") || modelId.startsWith("MiniMax-")) {
  return { src: minimaxUrl, alt: "MiniMax" };
}

MiniMax offering id

  • Changed the MiniMax image offering in catalog.default.json to { id: "image-01", modelId: "minimax-image-01" }, so the provider-native id passed to MiniMax is image-01 (the API model name) mapped to the canonical catalog model minimax-image-01 — matching the volcengine pattern (provider-native id ≠ canonical modelId).
  • Removed the now-redundant apiModelName indirection in minimax/shared.ts; minimax/image.ts and minimax/video.ts now pass model.id directly.
  • Updated the test fixtures, the MiniMax image test, and the docs (models.md, providers.md) accordingly.

"displayName": "MiniMax",
"image": [
{
"id": "minimax-image-01",
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@copilot what passed to minimax provider should be image-01, without "minimax-" prefix

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 3e01367. The MiniMax image offering now uses id: "image-01" (the API model name) mapped to canonical modelId: "minimax-image-01", matching the volcengine pattern. This removes the apiModelName indirection that previously rewrote minimax-image-01image-01. Updated fixtures, tests, and docs accordingly.

The minimax image offering now exposes id `image-01` (the MiniMax API
model name) mapped to canonical model `minimax-image-01`, matching the
volcengine pattern. Removes the apiModelName indirection since the
offering id is already the API name. Updates fixtures, tests and docs.
Copilot AI changed the title Use colored MiniMax provider icon and add Hailuo model icon Use colored MiniMax provider icon, add Hailuo model icon, and fix MiniMax offering id Jun 2, 2026
Copilot AI requested a review from unliftedq June 2, 2026 09:50
@unliftedq unliftedq marked this pull request as ready for review June 2, 2026 10:17
@unliftedq unliftedq requested a review from Copilot June 2, 2026 10:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR is described as a small fix to MiniMax icons and the MiniMax image-offering id (so image-01 is the provider-native id while minimax-image-01 is the canonical catalog model), but the diff also lands the entire MiniMax provider integration (image + video providers, registry/IPC/config/CLI wiring, desktop UI/i18n, docs, and tests). The Hailuo logo is now resolved before the MiniMax fallback so MiniMax-Hailuo-2.3 keeps its distinct brand mark while minimax-image-01 still shows the MiniMax logo.

Changes:

  • Use the colored Lobehub MiniMax SVG and add a dedicated colored Hailuo SVG, resolved by pickModelLogo before the MiniMax fallback.
  • Make the MiniMax image offering { id: "image-01", modelId: "minimax-image-01" } and drop the apiModelName indirection so providers pass model.id directly (matching the volcengine pattern).
  • Wire MiniMax end-to-end as a built-in provider: registry, schema/secrets, IPC contract + handlers, desktop providers/model logos/i18n, CLI vendor/routing/help, and docs.

Reviewed changes

Copilot reviewed 33 out of 35 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/providers/src/minimax/{image,video,shared}.ts New MiniMax image and Hailuo video providers + shared base_resp/auth helpers.
packages/providers/src/minimax/{image,video}.test.ts Unit tests covering submit/poll/fetch, base_resp errors, references, auth probe.
packages/providers/src/registry.ts, index.ts Register and re-export the new MiniMax providers; count in configured-provider tally.
packages/providers/src/catalog.default.json, catalog/test-fixtures.ts, registry.catalog.test.ts Add minimax-image-01 and MiniMax-Hailuo-2.3 catalog entries and matching test fixtures.
packages/config/src/schema.ts, secrets.ts, secrets.test.ts Add minimax to secrets/prefs schema, default config, and the env-secrets store + tests.
packages/ipc/src/contract.providers.ts, server.config-roundtrip.test.ts Add minimax to IPC prefs/masked-secrets/secrets-write schemas and round-trip coverage.
apps/desktop/src/main/ipc-handlers.ts Treat MiniMax as a well-known provider in summaries, masking, and prefs round-trip.
apps/desktop/src/renderer/pages/Providers/definitions.tsx Add MiniMax to built-in providers, display name, description, secrets patch, and mask helpers.
apps/desktop/src/renderer/pages/Models/modelLogo.tsx Resolve Hailuo logo before MiniMax fallback by model id.
apps/desktop/src/renderer/assets/logos/{minimax,hailuo}.svg New colored Lobehub MiniMax and Hailuo brand marks.
apps/desktop/src/renderer/i18n/messages.{en,zh}.ts Add MiniMax provider name/description strings.
apps/cli/src/support/config/{shared,provider-routing}.ts Add minimax to vendor keys, allowed fields (apiKey + baseUrl), and built-in routing ids.
apps/cli/src/commands/{image,video,models,config,mcp}.ts Mention minimax in CLI help and MCP tool description.
docs/{providers,models,configuration}.md, skills/imagent/SKILL.md, skills/imagent/references/setup.md, .env.example Document MiniMax setup, models, env var, and provider list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +137 to +145
if (secrets.minimax) {
const minimaxOpts: ConstructorParameters<typeof MiniMaxImageProvider>[0] = {
apiKey: secrets.minimax.apiKey,
models: mapFromList(resolveImageProviderModels(catalog, "minimax", prefs)),
};
const baseUrl = prefs.minimax?.baseUrl;
if (baseUrl) minimaxOpts.baseUrl = baseUrl;
out.set("minimax", new MiniMaxImageProvider(minimaxOpts));
}
@unliftedq unliftedq merged commit b945968 into main Jun 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants