Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@maxx-ukoo
Copy link
Contributor

@maxx-ukoo maxx-ukoo commented Sep 17, 2025

Describe Your Changes

Users can import embeddings models but these moders doesn't work as embedded models.
Also a lot of models support /embeddings and /chat at the same time but can't deteted as embeddings models. Allow users to emable embedding feture manually.

  • Enable detect embeddings support during import models
  • Switch to openAI compatible endpoint in llamacpp-server (https://github.com/ggml-org/llama.cpp/tree/master/tools/server)
  • Fix erro [tauri_plugin_llamacpp::commands][INFO] [llamacpp] error: invalid argument: --pooling mean on start llama server with embedding support

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed everything up to 054faef in 3 minutes and 27 seconds. Click for details.
  • Reviewed 307 lines of code in 9 files
  • Skipped 0 files when reviewing.
  • Skipped posting 10 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. web-app/src/services/providers/tauri.ts:29
  • Draft comment:
    When mapping over builtInModels (lines 29–31), the code uses the variable 'models' (initialized as provider.models) inside the map callback. Since 'models' is reassigned during the map, this may cause unexpected behavior. Consider storing the original provider.models in a separate variable (e.g. originalModels) for lookup.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. web-app/src/services/providers/tauri.ts:64
  • Draft comment:
    The logic to derive the base_url by removing '/chat/completions' (line 65) assumes that this exact substring exists. For robustness, consider using URL parsing or a more flexible pattern to handle variations.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. web-app/src/services/providers/tauri.ts:87
  • Draft comment:
    The try/catch blocks for checking tool and embeddings support (lines 85–103) are good, but consider logging more structured information or using a dedicated logger for consistency with the rest of the app.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. web-app/src/services/providers/tauri.ts:151
  • Draft comment:
    In fetchModelsFromProvider, headers are conditionally added based on base_url. Ensure that using a hard-coded origin 'tauri://localhost' is safe and works in all intended environments.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. web-app/src/services/providers/tauri.ts:172
  • Draft comment:
    Error handling for the models fetch (lines 173–191) is thorough. The use of structured error messages based on status codes is a good practice – just ensure that all expected status scenarios are covered.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. web-app/src/services/providers/tauri.ts:250
  • Draft comment:
    In updateSettings (lines 250–264), the mapping from provider settings to engine settings is performed. Confirm that the conversion between 'controller_props' and 'controllerProps' remains consistent across implementations.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
7. web-app/src/services/providers/tauri.ts:245
  • Draft comment:
    Consider defining a shared helper for building error messages and headers to reduce duplication between fetchModelsFromProvider and other provider methods.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
8. core/src/browser/extensions/engines/AIEngine.ts:287
  • Draft comment:
    Typographical note: The comment currently says "Check if a embedding is supported by the model". Consider replacing "a embedding" with "an embedding" (or possibly rephrase to "Check if embeddings are supported by the model") for grammatical consistency.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% While the grammar correction is technically accurate, it's a very minor issue that doesn't affect code functionality or clarity. The meaning is perfectly clear either way. The rules specifically state not to make purely informative comments or comments that are obvious/unimportant. Grammar nitpicks fall into this category. The comment is factually correct and improves documentation quality. Poor grammar in documentation could be seen as unprofessional. While correct, this type of minor grammatical fix doesn't warrant a PR comment. It's too trivial and could be fixed in a future documentation pass if needed. Delete this comment as it violates the rule about not making purely informative comments or comments about unimportant issues.
9. extensions-web/src/jan-provider-web/provider.ts:315
  • Draft comment:
    Typographical error: The comment "Jan models need to check from wed for embeddings support" contains "wed" which likely should be "web".
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% While the comment is technically correct about the typo, comments about typos in comments are generally not important enough to warrant a PR comment. The typo doesn't affect functionality, and fixing it would be a trivial change that doesn't improve code quality. There's actually a more serious typo in the console.log statement that would be more worth pointing out. The typo could indicate a lack of attention to detail that might manifest in more serious ways elsewhere in the code. Also, clear documentation is important for maintainability. While clear documentation is important, this particular typo is extremely minor and obvious - any reader would understand "wed" means "web" in this context. PR comments should focus on more substantive issues. Delete this comment as it points out a trivial typo in a comment that doesn't impact code functionality or significantly affect readability.
10. extensions/llamacpp-extension/src/index.ts:1994
  • Draft comment:
    Typographical error: The JSDoc comment reads "Check if a embeddings is supported by the model". Consider revising it to "Check if an embedding is supported by the model" or "Check if embeddings are supported by the model".
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% While the comment correctly identifies a grammatical error, comments about documentation typos are generally not critical enough to warrant a PR comment. The meaning is still clear despite the minor grammatical error. The comment doesn't point out any functional issues or suggest important code improvements. The comment is technically correct - there is a grammatical error. And clear documentation is important for code maintainability. While good documentation is important, minor grammatical fixes like this are too trivial for PR comments and can be fixed during regular code maintenance. The current wording, while imperfect, doesn't impede understanding. Delete the comment. While it points out a real grammatical error, such minor documentation fixes are too trivial for PR comments.

Workflow ID: wflow_44sjInCOu5SDSrKI

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.


async isEmbeddingsSupported(modelId: string): Promise<boolean> {
// Jan models need to check from wed for embeddings support
console.log(`Checking embeddings support for Jan model ${modelId}: тще supported`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Typographical error: The log message "тще supported" appears to contain incorrect characters. Did you mean "not supported" or similar?

Suggested change
console.log(`Checking embeddings support for Jan model ${modelId}: тще supported`);
console.log(`Checking embeddings support for Jan model ${modelId}: not supported`);

@maxx-ukoo
Copy link
Contributor Author

@urmauur @louis-menlo could you check this PR? If you agree to mrge it in general I will add to get correct pool_mode from model and pass to llama.cpp. Or we can remove --pooling parameter. In this case llama-server should get correct parameter from model.

@qnixsynapse qnixsynapse self-requested a review September 23, 2025 04:23
@maxx-ukoo maxx-ukoo force-pushed the mk_enable_embeddings branch from 6162676 to 1aec6d5 Compare October 13, 2025 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant