fix(wecom): normalize aeskey decoding and vision temperature - #9350
Open
mc436572 wants to merge 1 commit into
Open
fix(wecom): normalize aeskey decoding and vision temperature#9350mc436572 wants to merge 1 commit into
mc436572 wants to merge 1 commit into
Conversation
Normalize WeCom aeskey before decode so 43-character unpadded base64 keys decrypt reliably, preventing media extraction failures that break image analysis. Set vision temperature to 1 for providers that reject other values. Made-with: Cursor
Author
|
Additional validation details for reviewers:
After this PR:
|
Collaborator
teknium1
reviewed
Jul 12, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for isolating the WeCom media-decryption failure. The standard unpadded-key path is already fixed on current main: plugins/platforms/wecom/adapter.py:1069-1073 restores padding before decoding, via 8f4c0bf08 (released in v2026.5.7). The remaining URL-safe fallback is still useful, but needs a narrow salvage.
Problems
gateway/platforms/wecom.pywas moved toplugins/platforms/wecom/adapter.pyby560010547; the PR target no longer exists on current main.- The vision hunk would replace the configurable
auxiliary.vision.temperatureresolution attools/vision_tools.py:1229-1245with a global hardcoded value. Current coverage verifies configured1.0reaches the LLM intests/tools/test_vision_tools.py:426-453. - The diff adds no tests for URL-safe unpadded keys; current WeCom coverage uses standard base64 at
tests/gateway/test_wecom.py:381-394.
Suggested changes
- Port only the URL-safe decode fallback to
plugins/platforms/wecom/adapter.py:_decrypt_file_bytesand retain the existing padding behavior. - Add standard- and URL-safe-unpadded decrypt/media-cache regression tests in
tests/gateway/test_wecom.py.
Automated hermes-sweeper review.
| @@ -564,7 +564,7 @@ async def vision_analyze_tool( | |||
| call_kwargs = { | |||
Contributor
There was a problem hiding this comment.
Current main resolves auxiliary.vision.temperature before this call (tools/vision_tools.py:1229-1245) and tests a configured value of 1.0. Please drop this hardcoded default so providers/users that require a different value retain their configuration.
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.
Normalize WeCom aeskey before decode so 43-character unpadded base64 keys decrypt reliably, preventing media extraction failures that break image analysis. Set vision temperature to 1 for providers that reject other values.
Made-with: Cursor
What does this PR do?
Related Issue
Fixes #
Type of Change
Changes Made
How to Test
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs