Repository navigation
chore(anthropic): log hygiene and drop obsolete pdfs beta header - #4147
Open
hpiclaranet wants to merge 1 commit into
Open
hpiclaranet wants to merge 1 commit into
hpiclaranet wants to merge 1 commit into
Conversation
Contributor
Author
|
Rebased onto the latest main ( Note for reviewers: as mentioned in the Summary, the previous PR also proposed dropping the Suite on the rebased head: 165 passed, 18 skipped (live-API tests, no key); |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rebased onto current main (
888886e6, anthropic 0.3.39) and bumped to 0.3.40, as requested by @crazywoola on closing #3976. This supersedes #3976 (which was closed due to merge conflicts on the previous base; same two hygiene changes, adjusted for the newer main). It carries two low-risk hygiene fixes in the Anthropic provider, verified against the installedanthropicSDK (2.1.0) and the current official documentation.Full-payload logging demoted from INFO to DEBUG — six log statements dumped full request payloads, transformed tool schemas, the cache-block candidates (before pruning), the full API response, and every streamed chunk at INFO. The plugin daemon runs at INFO by default, so every user prompt, system prompt and response was written to daemon stdout on every invocation. They are now DEBUG behind a module-level
_debug_logging_enabled()guard — and the expensive_sanitize_for_logging()deep-copy of the request payload is also skipped when DEBUG is off. (Response and streamed-chunk logs remain unredacted when DEBUG is on.)Obsolete
pdfs-2024-09-25beta header removed — PDF (document) support is GA; the current official docs show PDF requests with no beta header. Thedocumentblock itself is unchanged and continues to be sent.Release Notes
pdfs-2024-09-25beta header for PDF input (PDF support is GA)Change Type
Screenshots / Videos
Not applicable — logging levels and request-header changes, covered by unit tests.
LLM Plugin Checklist
Areas affected by this change (check all that apply)
Version
versioninmanifest.yaml(not the one undermeta) — 0.3.39 → 0.3.40dify_plugin>=0.10.2,<0.11.0is declared inpyproject.tomland locked inuv.lock(satisfies the required>=0.3.0,<0.11.0range)Testing
uvvenv matchingmanifest.yaml,pyproject.toml, anduv.lock(no Dify platform instance in this run; validation was the plugin suite in that venv): full anthropic suite passes on the rebased head (d736778c, main888886e6, SDK 2.1.0) — 165 passed, 18 skipped (live-API tests skipped, noANTHROPIC_API_KEYset; includes Opus/Sonnet/Haiku 5.5 tests from feat(anthropic): add Claude Opus 5.5 #3919/feat(anthropic): add Claude Sonnet 5.5 model #4116/feat(anthropic): add Claude Haiku 5.5 #4072).ruff checkreports zero findings on the changed files.Known limitations (pre-existing, out of scope here):
anthropic_api_urlcredential that still required the legacypdfs-2024-09-25header would not receive it — no such requirement exists in any official endpoint.datafields; response and stream chunks are logged as-is); keep DEBUG off in production.