gptscript-ai / gptscript

Build AI assistants that interact with your systems
https://gptscript.ai
Apache License 2.0
2.78k stars 243 forks source link

Should be able to work with both "AWS" and "Anthropic" providers without having to manually delete existing credentials. #267

Closed sangee2004 closed 4 days ago

sangee2004 commented 2 months ago

Steps to reproduce the problem:

  1. Execute gptscript using anthropic model provider - gptscript --disable-cache --debug --default-model='claude-3-opus-20240229 from github.com/gptscript-ai/anthropic-provider' examples/bob.gpt This results in user being prompted for token and a credential - github.com/gptscript-ai/anthropic-provider/credential gets created.
  2. Execute gptscript using aws model provider - gptscript --disable-cache --debug --default-model='anthropic.claude-3-sonnet-20240229-v1:0 from from github.com/gptscript-ai/anthropic-provider' examples/bob.gpt This script will fail with anthropic.PermissionDeniedError: Error code: 403 - {'message': "You don't have access to the model with the specified model ID."} error.

Expected Behavior: User should be prompted for a model and he should be able to set "AWS" and be able to execute scripts successfully using the AWS env variables that have been set .

Note - When I delete the credentials that was created in step 2 , then user is prompted to set model provider and work with AWS models successfully.

drpebcak commented 4 days ago

We split this provider in two, so you can do this now.