Skip to content

feat(tool_search): add deferred tool loading support for GPT-5.4#2853

Open
amitksingh1490 wants to merge 13 commits intomainfrom
tool-search-gpt-5.4
Open

feat(tool_search): add deferred tool loading support for GPT-5.4#2853
amitksingh1490 wants to merge 13 commits intomainfrom
tool-search-gpt-5.4

Conversation

@amitksingh1490
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Apr 5, 2026
Comment on lines +256 to 257
let consumed_tso_indices: std::collections::HashSet<usize> = Default::default();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The consumed_tso_indices HashSet is created but never populated. This means the check at line 435 if consumed_tso_indices.contains(&idx) will always return false, and the logic to skip already-consumed ToolSearchOutput messages will never work.

This appears to be incomplete implementation - the code creates the tracking variable but never inserts any indices into it. If ToolSearchOutput entries should be consumed inline with assistant messages and skipped later, the code needs to actually track which indices were consumed.

// Either remove the unused tracking logic:
for (idx, entry) in messages.iter().enumerate() {
    match &entry.message {
        // ... handle messages without the consumed_tso_indices check
    }
}

// OR implement the actual tracking when consuming inline
Suggested change
let consumed_tso_indices: std::collections::HashSet<usize> = Default::default();
// TODO: Implement tracking of consumed ToolSearchOutput indices if needed for deduplication

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant