Conversation
demo.py (#388) shows the proxy governing Google Gen AI against a stub upstream, offline. This adds the other half: a real chat UI on the real API, where the only Prismor-aware line is the base_url on the client. Verified against prismor 1.50.0: streams through the proxy in enforce mode, and a credential pasted into the chat reaches Gemini as a @@secret:...@@ placeholder. Overhead measured at 0.5-2s per turn over a direct call (2.0-2.5s direct, 2.6-4.5s proxied, n=4). The README notes the 7080 collision: the proxy default is also demo.py's hardcoded port, and a second listener binds alongside an existing one rather than failing, sending requests to the wrong workspace and policy.
This branch has not been deployed
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.
examples/gemini-proxy-demo/demo.py(#388) shows the proxy governing Google Gen AI against a stub upstream, offline and keyless. This adds the other half: a real chat UI on the real API, where the only Prismor-aware line is thebase_urlon the client.22 lines total, including the chat loop.
Verified against prismor 1.50.0
PONG@@SECRET:...@@Two things worth knowing
Port 7080 collides. It is both the proxy default and
demo.py's hardcoded port. A second listener binds alongside an existing one rather than failing, and requests then land on whichever, under the wrong workspace and policy. This cost real debugging time on a box already running a long-lived proxy under a LaunchAgent. The README says to checklsofand pass--port; makingdemo.py's port overridable is a reasonable follow-up, left out here to keep the diff to new files.gemini-2.5-flashis retired — the API returns 404 pointing new users atgemini-3.6-flash, which is what this uses.