feat: port signing fix, tool emulation, retry, circuit breaker, UI + docs#5
Open
mingles-agent wants to merge 3 commits intomainfrom
Open
feat: port signing fix, tool emulation, retry, circuit breaker, UI + docs#5mingles-agent wants to merge 3 commits intomainfrom
mingles-agent wants to merge 3 commits intomainfrom
Conversation
added 3 commits
March 31, 2026 10:31
…docs - gonka_client.py: add encode_with_low_s() standalone function, stream_read_timeout parameter, updated signing to hash payload before signing (Phase 3 signing) - tool_emulation.py: port tool emulation module (no DB deps); supports JSON and <tool_call> XML formats, streaming and non-streaming paths - retry.py: port retry utilities with exponential backoff - circuit_breaker.py: port circuit breaker (5-failure threshold, 60s recovery) - main.py: wire tool emulation, circuit breaker, retry into chat completions; GONKA_STREAM_READ_TIMEOUT setting; circuit breaker state in /health - app/static/index.html: updated UI from private repo, no mingles.ai references - test_tool_emulation.py: port test suite with adapted imports - README.md: clean self-hosted docs, all env vars, Docker example, removed gonka-gateway.mingles.ai link Closes #1
- Remove Google OAuth login button and flow - Remove Keplr/Leap wallet connect button and flow - Remove balance display, deposit button, logout button - Remove Dashboard, API Keys, Transactions pages/nav - Remove session management (saveSession/loadSession/clearSession) - Remove billing/balance docs section - Remove GNK price display and token cost tracking - Add API key input field in Chat (env-var key for proxy access) - Simplify sendChatMessage to read key from input - Fix footer: CloudMine URL → https://cloudmine.mingles.ai/ - Fix footer: remove Support (t.me) link - Fix footer: add Gateway link → https://gonka-gateway.mingles.ai/
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.
Closes #1 in gonka-proxy-service.
What's changed
1. Signing fix —
app/gonka_client.pyencode_with_low_s()as a standalone function for clean low-S ECDSA normalizationstream_read_timeoutparameter (default 300s) to avoid stream cutoffs on long generations_sign_payloadto use Phase 3 signing: SHA-256 hash of payload → input for signature (matches private repo)2. Tool emulation —
app/tool_emulation.py{"tool_calls": [...]}) and XML format (<tool_call>...</tool_call>)test_tool_emulation.pywith adapted imports3. Retry —
app/retry.pyretry_with_backoff,retry_with_backoff_args,RetryConfig, predefined configs4. Circuit breaker —
app/circuit_breaker.py5. UI —
app/static/index.htmlmingles.aireferences replaced withlocalhost:80006. Wired into
main.pytoolsin request → emulate, parse response back to OpenAI formatGONKA_STREAM_READ_TIMEOUTenv var exposed in Settings/healthendpoint now includes circuit breaker state7. README.md
👉 https://gonka-gateway.mingles.ai/linemingles.aireferences anywhere in the repoAcceptance criteria
.env(no MongoDB):GONKA_PRIVATE_KEY,GONKA_ADDRESS,GONKA_ENDPOINT,GONKA_PROVIDER_ADDRESS,API_KEYmingles.aiURLs in public repo