Change auto_archive_duration type to string#14653
Open
andersmmg wants to merge 1 commit intoNousResearch:mainfrom
Open
Change auto_archive_duration type to string#14653andersmmg wants to merge 1 commit intoNousResearch:mainfrom
andersmmg wants to merge 1 commit intoNousResearch:mainfrom
Conversation
1 task
Collaborator
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.
Fixes #13653
What does this PR do?
Fixes a bug where cron jobs fail with Google AI API validation errors when using the
discord_servertool. The issue is that theauto_archive_durationparameter had an integer enum[60, 1440, 4320, 10080], but Google AI API requires string enums. This caused cron jobs (which include thediscord_servertool in their tool list) to fail with errors like:function_declarations[11].parameters.required[0]: property is not definedparameters.properties[11].value.enum[0]: cannot be empty/TYPE_STRING, 60Related Issue
Fixes #13653
Type of Change
Changes Made
tools/discord_tool.py: Changedauto_archive_durationschema enum from integers[60, 1440, 4320, 10080]to strings["60", "1440", "4320", "10080"]tools/discord_tool.py: Updated handler to convert string input back to integer withint(args.get("auto_archive_duration", 1440))How to Test
auto_archive_durationin_STATIC_SCHEMAnow has string enum valuesChecklist
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/A