#invalid keys

63 messages · Page 1 of 1 (latest)

crisp saddle
#

I think 403 is about moderation.

Error Codes (copied from https://openrouter.ai/docs#errors)

400: Bad Request (invalid or missing params, CORS)
401: Invalid credentials (OAuth session expired, disabled/invalid API key)
402: Out of credits
403: Your chosen model requires moderation and your input was flagged
408: Your request time out
429: You are being rate limited
502: Your chosen model is down or we received an invalid response from it

(I'm a user working on implementing code in my app to catch these errors, so I have no idea if this is relevant to you.)

sage arrow
#

If your client is using fetch, I would serialize the json() output we returned with the error response - it should give you more details on why your input was flagged.

#

If you are calling Claude 2, 403 is indeed moderation, enforced by upstream API unfortunately.

#

For uncensored models, I'd recommend Llama2

fleet rover
sage arrow
fleet rover
sage arrow
fleet rover
#

or is that a rhetorical question

sage arrow
#

Just making sure since I think you can use API key with the initial usage allowance

#

But not if you go under (it can go to negative)

fleet rover
#

any ideas?

sage arrow
#

Which model are you using btw?

fleet rover
#

claude v1

sage arrow
#

(disable the other character, just pick 1 and swap to claude v1)

#

(also the default cut off is 142 max tokens so that shouldn't drain your credits. just a quick test to see if there's something wrong with your acc specifically or if there's something wrong with the whole system. I just tested it on there and seems to work for me :d)

fleet rover
#

it works

sage arrow
#

weird...

fleet rover
#

also, I have managed to receive a response from gpt3.5 in the tavern

sage arrow
#

???

fleet rover
#

but not one from claude

sage arrow
#

via openrouter??

fleet rover
#

yeah

#

it seems gpt works, claude v1 doesn't

#

request appears properly in activity, key limit is adjusted correctly

sage arrow
#

can you screenshot how you configured your sillytavern endpoint? Make sure you pick OpenRouter and not Claude itself

#

(also make sure to hide ur keys doh)

#

I suspect you might have picked the native claude v1 in the dropdown instead of OpenRouter. 403 in claude means wrong API key, to which that's indeed the case if you sent Claude an OpenRouter API key: https://docs.anthropic.com/claude/reference/errors-and-rate-limits#http-errors

Claude

HTTP errorsOur API follows a predictable HTTP error code format: 400 - Invalid request: there was an issue with the format or content of your request.401 - Unauthorized: there's an issue with your API key.403 - Forbidden: your API key does not have permission to use the specified resource.404 - Not ...

fleet rover
#

did I not mention that the requests worked until yesterday?

sage arrow
#

yeah you did...

#

but why wouldn't it work now when gpt3.5 works lol

#

key disabled or exhausted <- also our API don't send this specific message back.

fleet rover
#

do I need to intercept the packet to see what's wrong?

#

this is what tavern is showing me

#

obviously this is different from 403 Unauthorized when using a made up key

sage arrow
fleet rover
#

yes

sage arrow
#

I tried looking up their repo for that string... nothing lol

#

The other explanation I can think of is that

#

claude v1 100k is pretty expensive per tokens: $0.01102 (in) $0.03268 (out)

fleet rover
#

this is what your API returns
{"error":{"message":"API key disabled or exhausted"},"quota_error":false}

#

i intercepted the request

sage arrow
#

yeah, and it's enclosed in a string right?

#

that means that error was proxied from upstream (i.e, claude is sending back that error)

#

if it's an error on our side, it would be a plain string message, not a json enclosed inside a string

fleet rover
sage arrow
#

yeah and it also worked on playground too

#

hmm.......

fleet rover
#

all anthropic models send the same thing back

sage arrow
#

I'm a bit baffled bc... if they were sending back err

#

we'd be seeing the exact issue on playground too

sage arrow
fleet rover
#

yes

sage arrow
#

The only potential diff between playground and tavern when it comes to API call is that we use streaming and tavern does not

fleet rover
#

streaming works well in tavern

sage arrow
#

you're also on the latest branch of tavern right?

fleet rover
#

I'm not changing my setup though
again, as I've said, it worked before and I'm obviously not making any elementary mistakes

fleet rover
#

@sage arrow i figured it out, it really was moderation, the antiquated tavern message error and the fact that you said only Claude 2 has moderation sent me sideways