Skip to content

feat: add universal proxy support and fix Gemini model resolution (#536)#546

Merged
di-sukharev merged 1 commit intodi-sukharev:masterfrom
freedomsky11:feat/proxy-support
Mar 29, 2026
Merged

feat: add universal proxy support and fix Gemini model resolution (#536)#546
di-sukharev merged 1 commit intodi-sukharev:masterfrom
freedomsky11:feat/proxy-support

Conversation

@freedomsky11
Copy link
Copy Markdown
Contributor

Description

This PR addresses the missing proxy support in version 3.x and fixes the Gemini model resolution issue reported in #536.

Changes

  • Universal Proxy Support: Integrated undici's ProxyAgent to support Node.js native fetch (used by Gemini and Mistral SDKs).
  • Configuration: Added OCO_PROXY config key. It automatically falls back to system HTTPS_PROXY / HTTP_PROXY if not explicitly set.
  • Engine Fixes:
    • Injected HttpsProxyAgent into OpenAI and Anthropic clients.
    • Upgraded @google/generative-ai to the latest version to fix the "Model not found" bug.
    • Enabled OCO_API_URL support for the Gemini engine.

Closes #536

@freedomsky11 freedomsky11 force-pushed the feat/proxy-support branch 3 times, most recently from 621b12b to b4bf55c Compare March 28, 2026 16:16
…ion (di-sukharev#536)

Integrated undici ProxyAgent for native fetch and HttpsProxyAgent for axios/openai/anthropic. Upgraded @google/generative-ai to fix di-sukharev#536. Added OCO_PROXY config.

Co-authored-by: uni <uni@hanwei.ink>
@di-sukharev di-sukharev merged commit db8a22b into di-sukharev:master Mar 29, 2026
6 checks passed
@di-sukharev
Copy link
Copy Markdown
Owner

thank you @freedomsky11

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

Successfully merging this pull request may close these issues.

[Bug]: None of the Gemini models are working with OCO

2 participants