fix: resolve 6 verified bugs across SDK, evaluation, and examples#167
Open
Ricardo-M-L wants to merge 1 commit intoagent-infra:mainfrom
Open
fix: resolve 6 verified bugs across SDK, evaluation, and examples#167Ricardo-M-L wants to merge 1 commit intoagent-infra:mainfrom
Ricardo-M-L wants to merge 1 commit intoagent-infra:mainfrom
Conversation
Bug 1 (Fixes agent-infra#134): createRequestUrl produced double '?' when baseUrl already contained query parameters. Now checks for existing '?' and uses '&' separator when appropriate. Bug 2: Agent loop max_iterations fallback returned messages[-1] which could be a tool response instead of an assistant message. Both AzureOpenAIAgentLoop and OpenAIAgentLoop now search backwards for the last assistant message. Bug 3: Volcengine createSandbox/listSandboxes spread ...kwargs[0] on top of already-mapped PascalCase fields, producing duplicate keys in the JSON body. Removed redundant spread. Bug 4: All Volcengine catch blocks silently swallowed errors by returning them instead of rethrowing. Changed to throw so callers can handle failures properly. Bug 5: site-to-markdown injected raw HTML into an f-string with triple quotes, allowing code injection if HTML contained '''. Now base64- encodes the HTML and decodes inside the sandbox. Bug 6: browser-use-cua example had duplicate imports (asyncio, os), duplicate Tools() instantiation, and duplicate __main__ block. Cleaned up to single definitions. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
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
Fixes #134 and 5 additional verified bugs found through source code review.
createRequestUrlproduced double?whenbaseUrlalready contained query parameters — now uses&separator when?is already presentmax_iterationsfallback returnedmessages[-1]which could be a tool response instead of an assistant message — now searches backwards for the last assistant message in bothAzureOpenAIAgentLoopandOpenAIAgentLoopcreateSandbox/listSandboxesspread...kwargs[0]on top of already-mapped PascalCase fields, producing duplicate camelCase+PascalCase keys in JSON body — removed redundant spreadreturn errorinstead of rethrowing — changed tothrow errorso callers can handle failures properlysite-to-markdownexample injected raw HTML into f-string with triple quotes, allowing code injection if HTML contained'''— now base64-encodes HTML and decodes inside the sandboxbrowser-use-cuaexample had duplicate imports (asyncio,os), duplicateTools()instantiation, and duplicate__main__block — cleaned up to single definitionsTest plan
createRequestUrl(7 tests) — all passingcreateSandbox/listSandboxesduplicate key prevention (2 tests) — all passingmax_iterationsfallback behavior (3 tests)vitest🤖 Generated with Claude Code