Skip to content

fix(protocol): preserve explicit reasoning disable - #150

Merged
jasonxu114514 merged 1 commit into
mainfrom
fix/issue-114-explicit-disable
Oct 23, 2026
Merged

jasonxu114514 merged 1 commit into
mainfrom
fix/issue-114-explicit-disable

Conversation

@jasonxu114514

Copy link
Copy Markdown
Owner

Summary

Fixes #114.

  • Preserve explicit none/disabled as a distinct reasoning state instead of treating it as unset.
  • Keep native disable controls ahead of configured forced effort for Chat, Responses, and Anthropic requests.
  • Emit the target protocol's explicit disable representation after conversion.
  • Document that explicit disable cannot be re-enabled by a default effort.

This replaces the inaccessible/conflicting implementation in #121 on the current main base.

Verification

  • go build -trimpath ./cmd/opencode2api
  • LSP diagnostics for internal/protocol/bridge.go and internal/protocol/request.go
  • git diff --check

No tests were created or run, per request.

@jasonxu114514
jasonxu114514 merged commit 394acb5 into main Oct 23, 2026
10 checks passed
@jasonxu114514
jasonxu114514 deleted the fix/issue-114-explicit-disable branch October 23, 2026 00:38
TiaraBasori added a commit to TiaraBasori/opencode2api-1 that referenced this pull request Oct 25, 2026
…breaker)

Pick up origin/main (19 commits since v1.4.3):

- 2.1.1 client shape: version bump, /inference/openai|anthropic family
  routes, max_completion_tokens 32000, strict:false tools, client key
  order, no HTML escaping, runtime-owned Accept/Content-Length (jasonxu114514#141-jasonxu114514#143)
- anonymous-lane abuse handling: IP-block detection, per-exit block TTL,
  circuit breaker (models.anonymous_backoff), max_anonymous_exits cap,
  deterministic 4xx stops the walk instead of replaying every exit
- placeholder key dropping, probe failure classification (jasonxu114514#111),
  WebUI Cache-Control (jasonxu114514#112), reasoning disable preserved end to end
  (jasonxu114514#150), Italian README/WebUI

Conflict resolutions:
- internal/config/config.go, README.md, README.zh-CN.md: kept both sides —
  the alias fields (aliases/strip_free_suffix) and the new
  anonymous_backoff block sit side by side in ModelsConfig and the README
  tables.

Local adaptation for this deployment's #pool exit (not upstream):
- a #pool transport dials a fresh upstream address on every attempt, so an
  IP-scoped abuse block cannot be parked on the transport: blocked() and
  markBlocked() ignore pool transports and the anonymous walk keeps
  rotating instead of freezing every exit behind one flagged address.
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(protocol): 显式关闭思考在转换中丢失,并可能被默认强度重新开启

1 participant