s-kostyaev / ellama

Ellama is a tool for interacting with large language models from Emacs.
GNU General Public License v3.0
348 stars 25 forks source link

certificate issues calling the api #103

Closed oatmealm closed 3 months ago

oatmealm commented 3 months ago

This started happening out of the blue, for one minute to the other. I double-checked my subscription and API access is still valid, but regardless, the error seems to be invalid certificate. Not sure if it's ellama or llm. Tried robby, which seems to still work fine. --- update, robby uses togetherai at the moment, so different provider.

Debugger entered--Lisp error: (error "Error calling the LLM: Error calling the LLM: Unkn...")
  error("Error calling the LLM: %s" "Error calling the LLM: Unknown error")
  #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_71>("Error calling the LLM: Unknown error")
  #f(compiled-function (_ msg) #<bytecode 0x1947790bfa54bdd4>)(error "Error calling the LLM: Unknown error")
  #f(compiled-function (type err) #<bytecode 0x3fa5e2b9aa15371>)(error "Error calling the LLM: Unknown error")
  llm-provider-utils-callback-in-buffer(#<buffer ellama hello (Claude).org> #f(compiled-function (type err) #<bytecode 0x3fa5e2b9aa15371>) error "Error calling the LLM: Unknown error")
  #f(compiled-function (_ data) #<bytecode -0x146aeaff7b3680cb>)(error "Error calling the LLM: Unknown error")
  #f(compiled-function (_ on-success on-error) #<bytecode -0x1368580f986a2266>)((:error (error http 400) :peer (:certificates ((:version 3 :serial-number "7e:d0:dc:f1:b7:b1:34:82:0e:fd:19:cc:ae:e6:e4:c2" :issuer "C=US,O=Google Trust Services LLC,CN=GTS CA 1P5" :valid-from "2024-02-08" :valid-to "2024-05-08" :subject "CN=api.anthropic.com" :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:c7:e0:71:48:35:c7:ab:7b:54:9b:d6:85:b0:7b:10:..." :certificate-id "sha1:a9:09:7c:dd:c6:1b:ff:ce:ca:cd:4d:03:8d:6f:f2:..." :pem "-----BEGIN CERTIFICATE-----\nMIIFezCCBGOgAwIBAgIQft...") (:version 3 :serial-number "02:03:bc:50:a3:27:53:f0:91:80:22:ed:f1" :issuer "C=US,O=Google Trust Services LLC,CN=GTS Root R1" :valid-from "2020-08-13" :valid-to "2027-09-30" :subject "C=US,O=Google Trust Services LLC,CN=GTS CA 1P5" :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:97:93:25:3a:9a:bb:55:85:91:e3:3f:3e:0f:5e:b2:..." :certificate-id "sha1:9c:0b:25:2a:67:8a:08:7f:be:e4:96:a4:43:77:f7:..." :pem "-----BEGIN CERTIFICATE-----\nMIIFjDCCA3SgAwIBAgINAg...") (:version 3 :serial-number "77:bd:0d:6c:db:36:f9:1a:ea:21:0f:c4:f0:58:d3:0d" :issuer "C=BE,O=GlobalSign nv-sa,OU=Root CA,CN=GlobalSign R..." :valid-from "2020-06-19" :valid-to "2028-01-28" :subject "C=US,O=Google Trust Services LLC,CN=GTS Root R1" :public-key-algorithm "RSA" :certificate-security-level "High" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:85:56:53:49:be:ea:4a:b1:86:49:b5:61:71:a9:95:..." :certificate-id "sha1:08:74:54:87:e8:91:c1:9e:30:78:c1:f2:a0:7e:45:..." :pem "-----BEGIN CERTIFICATE-----\nMIIFYjCCBEqgAwIBAgIQd7...")) :certificate (:version 3 :serial-number "7e:d0:dc:f1:b7:b1:34:82:0e:fd:19:cc:ae:e6:e4:c2" :issuer "C=US,O=Google Trust Services LLC,CN=GTS CA 1P5" :valid-from "2024-02-08" :valid-to "2024-05-08" :subject "CN=api.anthropic.com" :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:c7:e0:71:48:35:c7:ab:7b:54:9b:d6:85:b0:7b:10:..." :certificate-id "sha1:a9:09:7c:dd:c6:1b:ff:ce:ca:cd:4d:03:8d:6f:f2:..." :pem "-----BEGIN CERTIFICATE-----\nMIIFezCCBGOgAwIBAgIQft...") :key-exchange "ECDHE-RSA" :protocol "TLS1.3" :cipher "AES-256-GCM" :mac "AEAD" :encrypt-then-mac nil)) nil #f(compiled-function (_ data) #<bytecode -0x146aeaff7b3680cb>))
  url-http-activate-callback()
  url-http-content-length-after-change-function(344 524 180)
  url-http-wait-for-headers-change-function(1 537 536)
  url-http-generic-filter(#<process api.anthropic.com> "HTTP/1.1 400 Bad Request\15\nDate: Thu, 04 Apr 2024 0...")
s-kostyaev commented 3 months ago

I think it's an issue on a provider side. But you can ask @ahyatt about it. Open issue in llm repo.

oatmealm commented 3 months ago

It might be quota... I'm debuging via litellm and seeing another message...

ahyatt commented 3 months ago

What provider is this? Also, what version of llm are you using? We strive to give good error messages but sometimes the error is communicated in some unexpected way. I'd like to understand if there's something we can do better on the llm side.

oatmealm commented 3 months ago

What provider is this? Also, what version of llm are you using? We strive to give good error messages but sometimes the error is communicated in some unexpected way. I'd like to understand if there's something we can do better on the llm side.

Hi. Sorry for the late reply. It's Claude. It seems to be quota but indeed the error was about the certificate.