docs+test: gateway quickstart section + regression tests for issue #3#7
Open
dengluozhang-png wants to merge 1 commit into
Open
docs+test: gateway quickstart section + regression tests for issue #3#7dengluozhang-png wants to merge 1 commit into
dengluozhang-png wants to merge 1 commit into
Conversation
- README: expand 'Start the API server' with custom host/port, uvicorn example, endpoint table, provider env vars - tests/test_tool_use.py: add 4 regression tests for _parse_tool_call invalid-escape fallback: * test_parse_tool_call_windows_path * test_parse_tool_call_preserves_valid_escapes * test_parse_tool_call_unicode_escape_preserved * test_parse_tool_call_rejects_total_garbage Closes follow-up on issue lawcontinue#3 (which was fixed in 9e7878c without tests).
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
Follow-up on issue #3 (closed in commit 9e7878c without regression tests) and
adds user-facing gateway quickstart documentation that was missing from the
README.
This is a small, low-risk PR: 2 files changed, 21 new + 4 modified tests all
green, no source code changes outside
tests/.Changes
README.md— expand "Start the API server" sectionThe existing one-line snippet (
python -m opensymphony.gateway.http) leftusers without:
uvicorndirectly (production-style)This PR adds three subsections under Quick Start:
GATEWAY_HOST/GATEWAY_PORTenv varsuvicorn opensymphony.gateway.http:create_app --factory --host ... --port ...*_MODELoverride)No source-code change required; all env vars are already wired in
opensymphony/llm/router.py:create_router_from_env()— this just documentsthem.
tests/test_tool_use.py— 4 regression tests for issue #3 fixIssue #3 (
_parse_tool_callsilently drops tool calls with invalid JSONescapes) was fixed in commit 9e7878c with an inline regex fallback inside
agent.py. The fix shipped without tests. This PR closes that gap.Each test exercises the exact failure mode described in the original issue
(Windows paths in this case; regex strings
\d/\ware also covered bypreserves_valid_escapes).Test results
No regressions introduced. The new tests pass on commit 9e7878c without any
source changes — i.e. they confirm the existing fix works.
Why not push a PR with more changes
We also have local additions that are not upstream-suitable:
SearchCorpusTool(and itsTOOL_SCHEMASentry +register_all()call) —personal tooling, may not fit upstream's roadmap.
_swap_mimo_for_minimaxpersonal-deployment fallback inopensymphony/llm/router.py— a patch for one specific user's Mimo →MiniMax migration, not a generalizable change.
Those will stay as local patches. This PR is the minimum useful contribution:
better README + missing tests for the upstream fix.
Related
POST /human/chatreturns 422 — fixed in 9e7878c_parse_tool_callsilently drops tool calls — fixed in 9e7878c, tests added hereuvicornnot declared inpyproject.toml— fixed in 9e7878c_extract_substantivecorrupts code soul — fixed in 9e7878c