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

Api base url should be required when adding a custom model #108

Closed
cschneid opened this issue May 3, 2024 · 2 comments
Closed

Api base url should be required when adding a custom model #108

cschneid opened this issue May 3, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@cschneid
Copy link

cschneid commented May 3, 2024

I am getting this error after a trivial 'tell' command. One file is in context.

$ plandex tell 'Write a unit test'
βœ… Context is up to date

 πŸ’¬ User prompt πŸ‘‡

  Write a unit test



🚨 Server error
  β†’ Error starting reply stream
    β†’ Error, status code
      β†’ 401, message
        β†’ Incorrect API key provided
          β†’ Sk-or-v1*************************************************************de1a. You can find your API key at https://platform.openai.com/account/api-keys.

The Sk-or-v1*** key is my OPENROUTER_API_KEY.

πŸ€– Models
+-----------------+----------+----------------------------------+-------------+-------+
|      ROLE       | PROVIDER |              MODEL               | TEMPERATURE | TOP P |
+-----------------+----------+----------------------------------+-------------+-------+
| planner         | custom   | mistralai/mixtral-8x22b-instruct |         0.3 |   0.3 |
| summarizer      | custom   | mistralai/mixtral-8x22b-instruct |         0.2 |   0.2 |
| builder         | openai   | gpt-4-turbo                      |         0.1 |   0.1 |
| names           | openai   | gpt-3.5-turbo                    |         0.8 |   0.5 |
| commit-messages | openai   | gpt-3.5-turbo                    |         0.8 |   0.5 |
| auto-continue   | openai   | gpt-4-turbo                      |         0.1 |   0.1 |
+-----------------+----------+----------------------------------+-------------+-------+
πŸ› οΈ  Custom Models
+---+------------+----------------------------------+-------+--------------------+
| # |  PROVIDER  |               NAME               |  πŸͺ™   |         πŸ”‘         |
+---+------------+----------------------------------+-------+--------------------+
| 1 | openrouter | mistralai/mixtral-8x22b-instruct | 65536 | OPENROUTER_API_KEY |
+---+------------+----------------------------------+-------+--------------------+
@cschneid
Copy link
Author

cschneid commented May 3, 2024

Update: I figured out what happened. Probably a UX issue with adding custom models. I forgot to set the base url for openrouter, so I think it's still defaulting to openai.

I needed https://openrouter.ai/api/v1 in that field.

Maybe reject a blank, or at least confirm if that field is left blank on a new custom model?

@danenania
Copy link
Contributor

@cschneid I see, yes I'll make the base url a required field.

@danenania danenania added enhancement New feature or request good first issue Good for newcomers and removed good first issue Good for newcomers labels May 6, 2024
@danenania danenania self-assigned this May 6, 2024
@danenania danenania changed the title Appears to use incorrect API key with custom model Api base url should be required when adding a custom model May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants