Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenRouter API setting does not work #429

Open
wenlzhang opened this issue Apr 25, 2024 · 0 comments
Open

OpenRouter API setting does not work #429

wenlzhang opened this issue Apr 25, 2024 · 0 comments

Comments

@wenlzhang
Copy link

In the section OpenRouter.ai API Settings, I set an API Key and model. However, when chatting with a long note, it did not work. The output given by Copilot is empty. However, I can see three requests to OpenRouter on its website and the costs are deducted. I also the following messages repeated by three times in the console:

Failed to calculate number of tokens, falling back to approximate count Error: Unknown model
    at getEncodingNameForModel (plugin:copilot:19507:13)
    at encodingForModel (plugin:copilot:19655:22)
    at ProxyChatOpenAI.getNumTokens (plugin:copilot:20175:36)
    at eval (plugin:copilot:86391:36)
    at Array.map (<anonymous>)
    at ProxyChatOpenAI.getNumTokensFromMessages (plugin:copilot:86389:57)
    at ProxyChatOpenAI.getEstimatedTokenCountFromPrompt (plugin:copilot:86348:30)
    at ProxyChatOpenAI._generate (plugin:copilot:86300:43)
    at async Promise.allSettled (index 0)
    at async ProxyChatOpenAI._generateUncached (plugin:copilot:85542:21)

I also tried to set the following:
image
However, the long note chat did not work either. On the other hand, in pure chat mode, it works as expected.

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

No branches or pull requests

1 participant