Repository navigation
Claude subscription provider via a local Termux bridge - #60
Closed
henriqueleote wants to merge 1 commit into
Closed
henriqueleote wants to merge 1 commit into
henriqueleote wants to merge 1 commit into
Conversation
Owner
|
Thanks for the work on this, and for offering to split it. I'm not going to merge the subscription provider. Visor already talks to any OpenAI-compatible endpoint without a key, so the bridge works as it is: set the provider to OpenAI-compatible and the base URL to |
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.
Adds a third provider, Claude subscription, so the glasses can be answered by a Claude Pro/Max plan without an API key. It reuses the OpenAI-compatible path.
How it works:
bridge.js(Node, in Termux's Ubuntu proot) serves/v1/chat/completionson 127.0.0.1:8080 and keeps one warmclaude -pstream-json process, so an answer takes about 1.5-2 s on the phone instead of 7-12 s with one process per question. Questions never reach a shell.In the app
Provider.CLAUDE_SUBSCRIPTION, handled like OpenAI-compatible (Brain.kt,Models.kt); the settings screens treat it as configured without a key.RUN_COMMANDservice (TermuxBridge.kt, one permission and a<queries>entry).end_conversationdecided by the model by meaning.Vision.kt: a question the glasses read as describing an image (IMPLICIT_DESCRIBE_IMAGE) now asks for the photo.open_appphone tool ("open Spotify").SETUP.mdhas the Termux steps.Caveats: experimental. Claude Code does not list Android as supported, plan limits apply, and the Start button needs
allow-external-apps = truein Termux. Tested by hand on one pair of glasses and one phone;:app:assembleDebugpasses on top of currentmain. ThecurlURL inSETUP.mdpoints at my fork; change it if you merge.Happy to split this up (bridge + provider,
open_app, Vision fix) if you prefer smaller PRs.