Skip to content

fix: support gpt-5 chat through SkillClaw proxy - #64

Open
dfitz1138 wants to merge 1 commit into
AMAP-ML:mainfrom
dfitz1138:fix/gpt5-chat-token-param
Open

fix: support gpt-5 chat through SkillClaw proxy#64
dfitz1138 wants to merge 1 commit into
AMAP-ML:mainfrom
dfitz1138:fix/gpt5-chat-token-param

Conversation

@dfitz1138

Copy link
Copy Markdown

Translate legacy max_tokens to max_completion_tokens for gpt-5/o-series chat-completions requests while preserving legacy chat model behavior.

Also keep Hermes proxy compatibility guards for unsupported reasoning_effort fields and oversized completion-token requests.

Tests: uv run pytest tests/test_hermes_proxy_compat.py tests/test_responses_native.py -q

Translate legacy max_tokens to max_completion_tokens for gpt-5/o-series chat-completions requests while preserving legacy chat model behavior.

Also keep Hermes proxy compatibility guards for unsupported reasoning_effort fields and oversized completion-token requests.

Tests: uv run pytest tests/test_hermes_proxy_compat.py tests/test_responses_native.py -q
@Upper9527

Copy link
Copy Markdown
Collaborator

There is a useful minimal fix here—translating max_tokens to max_completion_tokens for OpenAI GPT-5/o-series chat models—but the PR also makes two global behavior changes that are too broad:

  1. reasoning_effort is stripped for every upstream, including reasoning-capable models that support it.
  2. Completion tokens are hard-capped at 8192 for every compatible provider/model, even when the configured upstream supports more.

Please split this down to the model-specific token-field translation, or make stripping/capping provider-aware and configurable with tests for reasoning-capable upstreams. As written it would silently disable requested reasoning and truncate valid larger outputs.

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.

2 participants