Skip to content

Fix jina-code model alias#1026

Open
Whamp wants to merge 1 commit intooptave:mainfrom
Whamp:fix/jina-code-model-alias
Open

Fix jina-code model alias#1026
Whamp wants to merge 1 commit intooptave:mainfrom
Whamp:fix/jina-code-model-alias

Conversation

@Whamp
Copy link
Copy Markdown

@Whamp Whamp commented Apr 29, 2026

Fixes #1025.

Summary

  • Point jina-code at jinaai/jina-embeddings-v2-base-code, which exists on Hugging Face.
  • Remove the stale README note that this model requires an HF token.
  • Add a regression test for the alias.

Verification

  • npm test -- tests/search/embedding-strategy.test.ts
  • npm run typecheck
  • npm run lint (passes with existing warnings)

@github-actions
Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


Test seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This PR fixes a broken model alias by pointing jina-code at the official jinaai/jina-embeddings-v2-base-code namespace on Hugging Face instead of the stale Xenova/ mirror, and removes the outdated HF-token requirement note from the README. A targeted regression test is added to guard against future regressions.

Confidence Score: 4/5

Safe to merge; the fix is minimal and well-tested with no logic changes beyond the model alias string.

Only P2-level observation (sibling jina aliases still use Xenova/ prefix), no blocking issues. Change is a one-liner with a regression test and a matching README cleanup.

src/domain/search/models.ts — verify jina-small and jina-base Xenova mirrors are still functional if they aren't updated.

Important Files Changed

Filename Overview
src/domain/search/models.ts Single-line alias fix: Xenova/jina-embeddings-v2-base-codejinaai/jina-embeddings-v2-base-code. Note that sibling aliases jina-small and jina-base still use Xenova/ prefixes; if those mirrors are also stale, a follow-up may be needed.
tests/search/embedding-strategy.test.ts Adds a regression test that asserts MODELS['jina-code'].name equals the new canonical path. Straightforward and correct.
README.md Removes the "(requires HF token)" qualifier from the jina-code row, consistent with the model now being publicly accessible.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["User selects model: 'jina-code'"] --> B["getModelConfig('jina-code')"]
    B --> C["MODELS['jina-code'].name"]
    C -->|"Before PR"| D["Xenova/jina-embeddings-v2-base-code\n(stale mirror, required HF token)"]
    C -->|"After PR"| E["jinaai/jina-embeddings-v2-base-code\n(official namespace, public)"]
    E --> F["loadModel → @huggingface/transformers pipeline"]
    D --> G["❌ 401 Unauthorized / model not found"]
    F --> H["✅ Embeddings generated"]
Loading

Comments Outside Diff (1)

  1. src/domain/search/models.ts, line 30-43 (link)

    P2 Sibling jina aliases still use Xenova/ mirrors

    jina-small and jina-base still point to Xenova/jina-embeddings-v2-small-en and Xenova/jina-embeddings-v2-base-en respectively. If the root cause of this bug was that the Xenova/ mirror for jina-code became stale or gated, it's worth checking whether those mirrors are still publicly accessible — the fix pattern here (jinaai/ namespace) would apply to them too.

    Fix in Claude Code

Fix All in Claude Code

Reviews (1): Last reviewed commit: "fix: point jina-code at published model ..." | Re-trigger Greptile

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.

Fix jina-code model alias

1 participant