Skip to content

feat(security): Port/re-implement dangerous tool call handler #343

Description

@matdev83

feat(security): Port/re-implement dangerous tool call handler

Check in Python LLM-Interactive-Proxy how this was originally implemented.
But this implementation is dated, was created by less capable models and may be flawed.
So we should only use it as inspiration only where it brings some value, not to blindly copy it into the Go-LIP.

Required research:

  • I noticed that Codex CLI agent app seems to have simimilar dangerous tool call prevention built in. As Codex CLI is maintained by much larger team, it may make sense to copy their experiences instead of re-inventing the wheel. So we are free to seek for inspiration there and copy best ideas into the our implementation

Refs:
https://github.com/openai/codex
https://github.com/matdev83/llm-interactive-proxy

I think that instead of pure porting this feature verbatim, we should make it better/simplier implementation.

Instead of complicated steering/feedback orchestration for the LLM we could just locally (at the proxy side) emulate tool call failures, like it hit the agent and was rejected there. I mean to produce some textual info in exact form like a failed tool call would produce with info about tool call being rejected due to being assessed as dangerous/potentially destructive.

This still warrants some analysis of the interplay of such synthetic proxy-generated output vs the context building/handling in subsequent turns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions