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

Gemini API calling problems #59

Open
Gentergt opened this issue Feb 12, 2025 · 1 comment
Open

Gemini API calling problems #59

Gentergt opened this issue Feb 12, 2025 · 1 comment

Comments

@Gentergt
Copy link

my gemini api is work! but when i try this project ,the error is timeout in the same environment.

Step 1 / Budget used 0.00%
Gaps: [ '1+1=?' ]
RetryError [AI_RetryError]: Failed after 3 attempts. Last error: Cannot connect to API: self-signed certificate in certificate chain
at _retryWithExponentialBackoff (D:\Research\CBS+\node-DeepResearch\node_modules\ai\util\retry-with-exponential-backoff.ts:51:13)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at async fn (D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\generate-object\generate-object.ts:457:34)
at async D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\telemetry\record-span.ts:18:22
at async evaluateQuestion (D:\Research\CBS+\node-DeepResearch\src\tools\evaluator.ts:379:20)
at async getResponse (D:\Research\CBS+\node-DeepResearch\src\agent.ts:328:44)
at async main (D:\Research\CBS+\node-DeepResearch\src\agent.ts:748:7) {
cause: undefined,
reason: 'maxRetriesExceeded',
errors: [
APICallError [AI_APICallError]: Cannot connect to API: self-signed certificate in certificate chain
at postToApi (D:\Research\CBS+\node-DeepResearch\node_modules@ai-sdk\provider-utils\src\post-to-api.ts:137:15)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at async GoogleGenerativeAILanguageModel.doGenerate (D:\Research\CBS+\node-DeepResearch\node_modules@ai-sdk\google\src\google-generative-ai-language-model.ts:212:50)
at async fn (D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\generate-object\generate-object.ts:489:32)
at async D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\telemetry\record-span.ts:18:22
at async _retryWithExponentialBackoff (D:\Research\CBS+\node-DeepResearch\node_modules\ai\util\retry-with-exponential-backoff.ts:36:12)
at async fn (D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\generate-object\generate-object.ts:457:34)
at async D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\telemetry\record-span.ts:18:22
at async evaluateQuestion (D:\Research\CBS+\node-DeepResearch\src\tools\evaluator.ts:379:20)
at async getResponse (D:\Research\CBS+\node-DeepResearch\src\agent.ts:328:44) {
cause: [Error],
url: 'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent',
requestBodyValues: [Object],
statusCode: undefined,
responseHeaders: undefined,
responseBody: undefined,
isRetryable: true,
data: undefined,
[Symbol(vercel.ai.error)]: true,
[Symbol(vercel.ai.error.AI_APICallError)]: true
},
APICallError [AI_APICallError]: Cannot connect to API: self-signed certificate in certificate chain
at postToApi (D:\Research\CBS+\node-DeepResearch\node_modules@ai-sdk\provider-utils\src\post-to-api.ts:137:15)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at async GoogleGenerativeAILanguageModel.doGenerate (D:\Research\CBS+\node-DeepResearch\node_modules@ai-sdk\google\src\google-generative-ai-language-model.ts:212:50)
at async fn (D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\generate-object\generate-object.ts:489:32)
at async D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\telemetry\record-span.ts:18:22
at async _retryWithExponentialBackoff (D:\Research\CBS+\node-DeepResearch\node_modules\ai\util\retry-with-exponential-backoff.ts:36:12)
at async fn (D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\generate-object\generate-object.ts:457:34)
at async D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\telemetry\record-span.ts:18:22
at async evaluateQuestion (D:\Research\CBS+\node-DeepResearch\src\tools\evaluator.ts:379:20)
at async getResponse (D:\Research\CBS+\node-DeepResearch\src\agent.ts:328:44) {
cause: [Error],
url: 'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent',
requestBodyValues: [Object],
statusCode: undefined,
responseHeaders: undefined,
responseBody: undefined,
isRetryable: true,
data: undefined,
[Symbol(vercel.ai.error)]: true,
[Symbol(vercel.ai.error.AI_APICallError)]: true
},
APICallError [AI_APICallError]: Cannot connect to API: self-signed certificate in certificate chain
at postToApi (D:\Research\CBS+\node-DeepResearch\node_modules@ai-sdk\provider-utils\src\post-to-api.ts:137:15)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at async GoogleGenerativeAILanguageModel.doGenerate (D:\Research\CBS+\node-DeepResearch\node_modules@ai-sdk\google\src\google-generative-ai-language-model.ts:212:50)
at async fn (D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\generate-object\generate-object.ts:489:32)
at async D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\telemetry\record-span.ts:18:22
at async _retryWithExponentialBackoff (D:\Research\CBS+\node-DeepResearch\node_modules\ai\util\retry-with-exponential-backoff.ts:36:12)
at async fn (D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\generate-object\generate-object.ts:457:34)
at async D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\telemetry\record-span.ts:18:22
at async evaluateQuestion (D:\Research\CBS+\node-DeepResearch\src\tools\evaluator.ts:379:20)
at async getResponse (D:\Research\CBS+\node-DeepResearch\src\agent.ts:328:44) {
cause: [Error],
url: 'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent',
requestBodyValues: [Object],
statusCode: undefined,
responseHeaders: undefined,
responseBody: undefined,
isRetryable: true,
data: undefined,
[Symbol(vercel.ai.error)]: true,
[Symbol(vercel.ai.error.AI_APICallError)]: true
}
],
lastError: APICallError [AI_APICallError]: Cannot connect to API: self-signed certificate in certificate chain
at postToApi (D:\Research\CBS+\node-DeepResearch\node_modules@ai-sdk\provider-utils\src\post-to-api.ts:137:15)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at async GoogleGenerativeAILanguageModel.doGenerate (D:\Research\CBS+\node-DeepResearch\node_modules@ai-sdk\google\src\google-generative-ai-language-model.ts:212:50)
at async fn (D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\generate-object\generate-object.ts:489:32)
at async D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\telemetry\record-span.ts:18:22
at async _retryWithExponentialBackoff (D:\Research\CBS+\node-DeepResearch\node_modules\ai\util\retry-with-exponential-backoff.ts:36:12)
at async fn (D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\generate-object\generate-object.ts:457:34)
at async D:\Research\CBS+\node-DeepResearch\node_modules\ai\core\telemetry\record-span.ts:18:22
at async evaluateQuestion (D:\Research\CBS+\node-DeepResearch\src\tools\evaluator.ts:379:20)
at async getResponse (D:\Research\CBS+\node-DeepResearch\src\agent.ts:328:44) {
cause: Error: self-signed certificate in certificate chain
at TLSSocket.onConnectSecure (node:_tls_wrap:1679:34)
at TLSSocket.emit (node:events:518:28)
at TLSSocket.emit (node:domain:489:12)
at TLSSocket._finishInit (node:_tls_wrap:1078:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:864:12) {
code: 'SELF_SIGNED_CERT_IN_CHAIN'
},
url: 'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent',
requestBodyValues: {
generationConfig: [Object],
contents: [Array],
systemInstruction: undefined,
safetySettings: undefined,
cachedContent: undefined
},
statusCode: undefined,
responseHeaders: undefined,
responseBody: undefined,
isRetryable: true,
data: undefined,
[Symbol(vercel.ai.error)]: true,
[Symbol(vercel.ai.error.AI_APICallError)]: true
},
[Symbol(vercel.ai.error)]: true,
[Symbol(vercel.ai.error.AI_RetryError)]: true
}

@jeanchristophe13v
Copy link

jeanchristophe13v commented Feb 16, 2025

if u are using vpn, try setting proxy env

e.g. $env:https_proxy="http://127.0.0.1:7890"

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

2 participants