Skip to content

fix: reapply HTTP patch and fix error-log provider name - #12

Open
MIsmail3018 wants to merge 1 commit into
p32929:masterfrom
MIsmail3018:feature/http-patch-fix
Open

fix: reapply HTTP patch and fix error-log provider name#12
MIsmail3018 wants to merge 1 commit into
p32929:masterfrom
MIsmail3018:feature/http-patch-fix

Conversation

@MIsmail3018

Copy link
Copy Markdown

Summary

Re-applies the HTTP protocol patch that was silently reverted, fixing local upstream proxying (OmniRoute). Also fixes an error-logging bug where provider name was always logged as unknown.

Changes

src/openaiClient.js

  • Replaced https.request with this.protocol.request (resolved from baseUrl prefix) in both sendRequest() and sendStreamingRequest()
  • Fixes SSL WRONG_VERSION_NUMBER errors when proxying to local HTTP upstreams

src/server.js

  • Fixed catch block (line 319) to use routeInfo.providerName instead of hardcoded unknown
  • Error logs now correctly identify which provider returned the error

Verification

  • All 18 keys across 6 providers return HTTP 200 on verify-all
  • Rotato proxies correctly to both OpenRouter (HTTPS) and OmniRoute (HTTP)

…r name

- Replaced https.request with protocol.request in openaiClient.js
  (was reverted during a prior rollback, breaking local HTTP upstreams
  like OmniRoute)
- Fixed catch block in server.js to log real providerName instead of
  hardcoded 'unknown'
- Added keys_registry.json for human-readable key naming
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.

1 participant