Skip to content

fix(proxy): forward tool turns and OpenAI params upstream, 502 on unreachable provider - #73

Merged
Caezarr merged 7 commits into
mainfrom
fix/openai-proxy-passthrough
Nov 29, 2026
Merged

Caezarr merged 7 commits into
mainfrom
fix/openai-proxy-passthrough

Conversation

@Caezarr

@Caezarr Caezarr commented Nov 29, 2026

Copy link
Copy Markdown
Owner

The /v1/chat/completions proxy silently dropped anything outside model/messages/temperature/top_p/max_tokens:

  • Tool calling was broken: tool_calls on assistant messages and tool_call_id on tool messages were stripped by ChatMessage, so upstream providers reject the conversation.
  • Standard params ignored: stop, seed, tools, tool_choice, response_format, penalties, max_completion_tokens, stream_options… were accepted (extra=allow) but never forwarded. QueryRouter-only fields (routing_preference, modelKwargs) stay local.
  • Network errors: an unreachable provider raised an unhandled httpx error (500); now a 502 naming the provider.

One commit per change, tests in tests/test_openai_compat.py, CHANGELOG entry.

@Caezarr
Caezarr merged commit e4db10a into main Nov 29, 2026
5 checks passed
@Caezarr
Caezarr deleted the fix/openai-proxy-passthrough branch November 29, 2026 08:11
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