-
Notifications
You must be signed in to change notification settings - Fork 0
Add proxy validation tool #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add proxy validation tool #60
Conversation
52b1449 to
e51e53f
Compare
e51e53f to
7482ae1
Compare
remh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice stuff. I have a few tiny nitpicks, feel free to address the ones worth addressing and merge.
|
|
||
| ```bash | ||
| # Test with both OpenAI and Anthropic models through chat-completions format | ||
| pnpm validate --proxy-url http://localhost:8080 --models openai,anthropic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiny nitpick but we should call the option provider instead of models
| | `--proxy-url <url>` | Proxy URL (required) | | ||
| | `--api-key <key>` | API key for gateway | | ||
| | `--format <formats>` | Formats to test: `chat-completions`, `responses`, `anthropic` | | ||
| | `--models <models>` | Model providers: `openai`, `anthropic` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it supports bedrock and google as well no? let's list them
| }) | ||
| .join("\\."); | ||
|
|
||
| const regex = new RegExp(`^${regexPattern}$`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
likely not needed now but we could cache the regex if things start getting too slow, i doubt that's the case now though
| @@ -0,0 +1,202 @@ | |||
| // JSON comparison utilities with field ignore support | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's generate a couple of unit tests for those functions?

TL;DR
Added a validation tool to compare LLM proxy responses against captured snapshots, ensuring API compatibility.
Testing - ran manually:
Why make this change?
This validation tool enables systematic testing of LLM proxies and gateways against known-good responses. It helps ensure that proxies maintain API compatibility with original providers.