Skip to content

Add MiniMax embo-01 as third embedding provider#45

Closed
octo-patch wants to merge 1 commit intotirth8205:mainfrom
octo-patch:feature/add-minimax-embedding-provider
Closed

Add MiniMax embo-01 as third embedding provider#45
octo-patch wants to merge 1 commit intotirth8205:mainfrom
octo-patch:feature/add-minimax-embedding-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

Adds MiniMax embo-01 as the third embedding provider for semantic code search, alongside the existing Local (sentence-transformers) and Google Gemini providers.

Key changes:

  • MiniMaxEmbeddingProvider class in embeddings.py — calls the MiniMax Embeddings API (https://api.minimax.io/v1/embeddings) with the embo-01 model (1536 dimensions)
  • Zero extra dependencies — uses Python stdlib urllib.request, no new packages needed
  • Distinct task types: type="db" for indexing, type="query" for search queries (matches the MiniMax API spec)
  • Retry with exponential backoff for rate-limit (429) and server errors (500/503)
  • Factory registration: get_provider("minimax") with MINIMAX_API_KEY env var auto-detection
  • README update: documents the MiniMax provider alongside Google Gemini

Test plan

  • 13 new unit tests covering provider properties, API call format, auth header, batching, retry, error handling, and factory registration
  • 3 integration tests (require MINIMAX_API_KEY env var, skip when not set)
  • All 30 unit tests pass (pytest tests/test_embeddings.py -k 'not Integration')
  • Existing tests unaffected
  • ruff check passes with no issues

Usage

export MINIMAX_API_KEY=your-key
# Then use provider="minimax" in EmbeddingStore or get_provider("minimax")

Add MiniMaxEmbeddingProvider using the MiniMax Embeddings API
(embo-01 model, 1536 dimensions) with distinct task types for
indexing (db) and search queries (query). Zero extra dependencies
needed - uses stdlib urllib.request. Includes retry logic with
exponential backoff for rate-limit (429) and server errors.

- Add MiniMaxEmbeddingProvider class in embeddings.py
- Update get_provider() factory to handle "minimax" provider name
- Add 13 unit tests (provider, factory, batching, retry, auth)
- Add 3 integration tests (require MINIMAX_API_KEY env var)
- Update README with MiniMax embedding docs
tirth8205 added a commit that referenced this pull request Mar 26, 2026
Adds MiniMaxEmbeddingProvider using the embo-01 model (1536 dimensions)
with support for distinct task types (db/query), batching, and retry logic.

Co-Authored-By: octo-patch <noreply@github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tirth8205 added a commit that referenced this pull request Mar 26, 2026
…nfigurable embeddings, MiniMax, Perl)

* feat: integrate PR #43 — R language support

Adds R language parsing with function extraction (both <- and = assignment),
S4/R5 class detection via setClass/setRefClass, library/require/source
imports, namespace-qualified calls (dplyr::filter), and testthat test detection.

Co-Authored-By: michael-denyer <noreply@github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: integrate PR #54 — Vitest/Jest test detection

Adds describe/it/test block parsing for JS/TS test files, producing
synthetic Test nodes with description labels. Supports modifier suffixes
(describe.only, it.skip, test.each) and nested describe/it containment.

Co-Authored-By: JF10R <noreply@github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: integrate PR #53 — tsconfig path alias resolution

Adds TsconfigResolver module that resolves TypeScript path aliases
(e.g., @/ -> src/) from tsconfig.json compilerOptions.paths. Also
resolves import targets to absolute file paths in IMPORTS_FROM edges.

Co-Authored-By: JF10R <noreply@github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: integrate PR #58 — .mjs/.astro support

Adds .mjs extension mapping to JavaScript and .astro extension mapping
to TypeScript for import path resolution.

Co-Authored-By: zoneghost7 <noreply@github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: integrate PR #55 — configurable embedding model

Adds CRG_EMBEDDING_MODEL env var and model parameter to embedding
functions, allowing users to specify any sentence-transformers compatible
model. Changing the model re-embeds all nodes automatically.

Co-Authored-By: eugenepro2 <noreply@github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: integrate PR #45 — MiniMax embedding provider

Adds MiniMaxEmbeddingProvider using the embo-01 model (1536 dimensions)
with support for distinct task types (db/query), batching, and retry logic.

Co-Authored-By: octo-patch <noreply@github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: integrate PR #62 — Perl support

Adds Perl language parsing with package detection, subroutine extraction,
use/require imports, and function call tracking. Includes test fixture
and comprehensive test class.

Co-Authored-By: potatogim <noreply@github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: michael-denyer <noreply@github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tirth8205
Copy link
Copy Markdown
Owner

Integrated into main via PR #68. Thank you for the contribution! 🎉

@tirth8205 tirth8205 closed this Mar 26, 2026
zoneghost7 pushed a commit to WalkingWithGiants/code-review-graph that referenced this pull request Apr 9, 2026
…nfigurable embeddings, MiniMax, Perl)

* feat: integrate PR tirth8205#43 — R language support

Adds R language parsing with function extraction (both <- and = assignment),
S4/R5 class detection via setClass/setRefClass, library/require/source
imports, namespace-qualified calls (dplyr::filter), and testthat test detection.

Co-Authored-By: michael-denyer <noreply@github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: integrate PR tirth8205#54 — Vitest/Jest test detection

Adds describe/it/test block parsing for JS/TS test files, producing
synthetic Test nodes with description labels. Supports modifier suffixes
(describe.only, it.skip, test.each) and nested describe/it containment.

Co-Authored-By: JF10R <noreply@github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: integrate PR tirth8205#53 — tsconfig path alias resolution

Adds TsconfigResolver module that resolves TypeScript path aliases
(e.g., @/ -> src/) from tsconfig.json compilerOptions.paths. Also
resolves import targets to absolute file paths in IMPORTS_FROM edges.

Co-Authored-By: JF10R <noreply@github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: integrate PR tirth8205#58 — .mjs/.astro support

Adds .mjs extension mapping to JavaScript and .astro extension mapping
to TypeScript for import path resolution.

Co-Authored-By: zoneghost7 <noreply@github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: integrate PR tirth8205#55 — configurable embedding model

Adds CRG_EMBEDDING_MODEL env var and model parameter to embedding
functions, allowing users to specify any sentence-transformers compatible
model. Changing the model re-embeds all nodes automatically.

Co-Authored-By: eugenepro2 <noreply@github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: integrate PR tirth8205#45 — MiniMax embedding provider

Adds MiniMaxEmbeddingProvider using the embo-01 model (1536 dimensions)
with support for distinct task types (db/query), batching, and retry logic.

Co-Authored-By: octo-patch <noreply@github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: integrate PR tirth8205#62 — Perl support

Adds Perl language parsing with package detection, subroutine extraction,
use/require imports, and function call tracking. Includes test fixture
and comprehensive test class.

Co-Authored-By: potatogim <noreply@github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: michael-denyer <noreply@github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tirth8205
Copy link
Copy Markdown
Owner

MiniMax embedding provider is already in main — embeddings.py has MiniMaxEmbeddingProvider class (line 167+) with embo-01 model, MINIMAX_API_KEY support, retry logic, and factory registration. This PR has been integrated. No revival needed.

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.

2 participants