continuedev / continuedev/continue

Add a request rate limit for embeddings model

Open
#3,106 6 comments 0 reactions 1 assignee View on GitHub

@sestinj is already working on this.

Since Nov 27, 2024.

area:indexing ide:vscode kind:bug needs-triage os:windows priority:medium
Dominant language
TypeScript
Stars
36k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Before submitting your bug report
Relevant environment info
- OS: Windows 11
- Continue version: 0.8.57
- IDE version: VS Codium
- Model: Mistral Embed API
Description

So my embeddings settings look something like this:

config.ts

mistral_embeddings: {
    model: "mistral-embed",
    apiKey: apiKeys.MISTRAL,
    maxChunkSize: 2048,
    maxBatchSize: 16,
    requestOptions: {
      timeout: 1001
    },
    provider: "mistral",
    apiBase: "https://api.mistral.ai/v1"
  },

When using this configuration to generate embeddings, I get this console msg:

[Extension Host] error when indexing:  Error: Failed to generate embeddings for 129 chunks with provider: MistralEmbeddingsProvider::mistral-embed::2048: Error: {"message":"Requests rate limit exceeded"}
  at LanceDbIndex.getEmbeddings (c:\Users\Lakshit\.vscode-oss\extensions\continue.continue-0.8.57-win32-x64\out\extension.js:175314:17)
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  at async LanceDbIndex.computeRows (c:\Users\Lakshit\.vscode-oss\extensions\continue.continue-0.8.57-win32-x64\out\extension.js:175262:28)
  at async LanceDbIndex.update (c:\Users\Lakshit\.vscode-oss\extensions\continue.continue-0.8.57-win32-x64\out\extension.js:175418:24)
  at async CodebaseIndexer.indexFiles (c:\Users\Lakshit\.vscode-oss\extensions\continue.continue-0.8.57-win32-x64\out\extension.js:540456:39)
  at async CodebaseIndexer.refresh (c:\Users\Lakshit\.vscode-oss\extensions\continue.continue-0.8.57-win32-x64\out\extension.js:540328:30)
  at async Core.refreshCodebaseIndex (c:\Users\Lakshit\.vscode-oss\extensions\continue.continue-0.8.57-win32-x64\out\extension.js:541322:26)

Same issue I am facing in voyage too:

[Extension Host] error when indexing:  Error: Failed to generate embeddings for 271 chunks with provider: VoyageEmbeddingsProvider::voyage-code-2: Error: {"detail":"You have not yet added your payment method in the billing page and will have reduced rate limits of 3 RPM and 10K TPM.  Please add your payment method in the billing page (https://dash.voyageai.com/billing/payment-methods) to unlock our standard rate limits (https://docs.voyageai.com/docs/rate-limits).  Even with payment methods entered, the free tokens (200M tokens for Voyage series 3) will still apply. See our pricing docs (https://docs.voyageai.com/docs/pricing) for the free tokens for your model."}
	at LanceDbIndex.getEmbeddings (c:\Users\Lakshit\.vscode-oss\extensions\continue.continue-0.8.57-win32-x64\out\extension.js:175314:17)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async LanceDbIndex.computeRows (c:\Users\Lakshit\.vscode-oss\extensions\continue.continue-0.8.57-win32-x64\out\extension.js:175262:28)
	at async LanceDbIndex.update (c:\Users\Lakshit\.vscode-oss\extensions\continue.continue-0.8.57-win32-x64\out\extension.js:175418:24)
	at async CodebaseIndexer.indexFiles (c:\Users\Lakshit\.vscode-oss\extensions\continue.continue-0.8.57-win32-x64\out\extension.js:540456:39)
	at async CodebaseIndexer.refresh (c:\Users\Lakshit\.vscode-oss\extensions\continue.continue-0.8.57-win32-x64\out\extension.js:540328:30)
	at async Core.refreshCodebaseIndex (c:\Users\Lakshit\.vscode-oss\extensions\continue.continue-0.8.57-win32-x64\out\extension.js:541322:26)

So i request you to resolve this. Thanks!

Also btw, is there a way to index the contents ? I just read the difference between indexing and embedding and would love if my model know where a particular function is used etc and that seems to be done by indexing maybe??

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.