Repository navigation
t18: fix CodeRabbit review feedback from PR #6 - #20
Conversation
- readme.txt: update provider id references from 'anthropic-max' to 'ultimate-ai-connector-anthropic-max' (lines 39, 56) — docs now match the renamed provider registered since v1.1.0 - js/connector.jsx: freeze CONFIG with Object.freeze() so the shared object passed to all deferred registerConnector() calls is immutable Closes #18
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 18 minutes and 53 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
MERGE_SUMMARYWhat was done: Fixed three CodeRabbit review suggestions from PR #6 that were merged unresolved (issue #18).
Testing: Changes are documentation and defensive coding only; no runtime behaviour changed. Verified the updated strings are correct via Issue closed: Resolves #18 |
… tool-use (#29) * fix(anthropic): round-trip thinking signature for extended-thinking + tool-use Anthropic's Messages API rejects multi-turn requests that echo back a prior 'thinking' content block without the original 'signature' field — required for extended thinking when interleaved with tool_use. Previously: - Inbound parser dropped the signature, constructing the thought-channel MessagePart with only (text, channel). The signature was lost. - Outbound serializer emitted {type:'thinking', thinking:<text>} with no signature field, so the second turn of any extended-thinking + tool-use exchange got a 400 from Anthropic. Capture the signature on inbound when the SDK exposes thought signatures (php-ai-client >= 1.3.0, gated via method_exists), and replay it on outbound when the MessagePart carries one. Pre-1.3 SDKs behave exactly as before. Mirrors WordPress/ai-provider-for-anthropic PR #20 in scope but uses method_exists gating to match this plugin's existing Codex model (src/Models/ChatGptCodexTextGenerationModel.php) style. Note: redacted_thinking blocks are still dropped on inbound — a separate follow-up. * fix(anthropic): round-trip redacted_thinking blocks Extends the prior commit to handle Anthropic's redacted_thinking content blocks, which are emitted when the safety system redacts the model's chain of thought. Previously they were silently dropped on inbound, breaking any conversation containing them as soon as it was replayed across the second turn. Pack the encrypted 'data' field into a JSON-shaped thought signature ({"type":"redacted_thinking","data":"<...>"}) on an empty-text thought-channel MessagePart, mirroring the JSON-blob signature pattern already used by this plugin's ChatGptCodexTextGenerationModel for OpenAI Responses-API reasoning items. On outbound, peek the signature: if it JSON-decodes to a redacted shape, emit a redacted_thinking block; otherwise emit a thinking block with the raw signature (existing behaviour preserved). Pre-1.3 SDKs lack the thought-signature slot entirely; in that case redacted_thinking remains a silent drop (no regression). Verified via reflection-based round-trip in a live WP runtime: - thinking + signature: byte-for-byte round-trip - redacted_thinking: byte-for-byte round-trip - thinking (no sig): byte-for-byte round-trip (legacy path)
Summary
Addresses the three actionable suggestions from CodeRabbit's review of PR #6 that were merged unresolved (tracked in issue #18).
Changes
anthropic-maxtoultimate-ai-connector-anthropic-max; docs now match the renamed provider registered since v1.1.0.CONFIGobject now wrapped withObject.freeze()so the shared reference passed to all five deferredregisterConnector()calls is immutable and cannot be accidentally mutated between ticks.Verification
No behaviour change. No version bump needed (documentation and defensive coding only).
Resolves #18