Skip to content

Add generic Dynamo agent proxy#3

Open
Aphoh wants to merge 1 commit into
ai-dynamo:mainfrom
Aphoh:Aphoh/generic-agent-proxy
Open

Add generic Dynamo agent proxy#3
Aphoh wants to merge 1 commit into
ai-dynamo:mainfrom
Aphoh:Aphoh/generic-agent-proxy

Conversation

@Aphoh

@Aphoh Aphoh commented May 25, 2026

Copy link
Copy Markdown

Summary

  • add a standalone Python dynamo-agent-proxy package installable with uv pip install from this repository
  • inject nvext.agent_context / nvext.agent_hints for OpenAI /v1/chat/completions and /v1/responses passthrough requests
  • add Anthropic /v1/messages compatibility by translating requests to Dynamo /v1/chat/completions and translating non-streaming/streaming responses back to Anthropic shapes
  • keep the proxy dependency-light and agent-agnostic; no Pi plugins are required and the package uses the Python standard library at runtime
  • preserve unknown existing nvext fields while making proxy-provided context and hint keys authoritative
  • document generic proxy install/usage and add Python unit tests
  • keep the existing Pi TypeScript provider package metadata unchanged

Review notes

  • removed unused code and single-use helpers, and simplified Anthropic text conversion to reduce the proxy implementation
  • stripped compressed/duplicate request headers on rewritten JSON bodies and passed Anthropic upstream errors through before stream translation
  • scanned the changed Python package for risky process/file execution APIs such as subprocess, eval, exec, os.system, pickle, ctypes, and temp-file creation; none are used

Test plan

  • PYTHONPATH=python python3 -m unittest discover -s test/python
  • python3 -m py_compile python/dynamo_agent_proxy/proxy.py python/dynamo_agent_proxy/__init__.py python/dynamo_agent_proxy/__main__.py test/python/test_agent_proxy.py
  • python3 -m pip wheel . --no-deps --no-build-isolation -w /tmp/dynamo-agent-proxy-wheel-review
  • install package in a temporary venv and run dynamo-agent-proxy --help
  • npm run check
  • npm test
  • npm run build

@Aphoh Aphoh force-pushed the Aphoh/generic-agent-proxy branch from a290f1f to 7e80960 Compare May 25, 2026 04:15
Signed-off-by: William Arnold <7565007+Aphoh@users.noreply.github.com>
@Aphoh Aphoh force-pushed the Aphoh/generic-agent-proxy branch from 7e80960 to 35848b7 Compare May 25, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant