Skip to content

Claude subscription provider via a local Termux bridge - #60

Closed
henriqueleote wants to merge 1 commit into
macedonga:mainfrom
henriqueleote:claude-subscription
Closed

henriqueleote wants to merge 1 commit into
macedonga:mainfrom
henriqueleote:claude-subscription

Conversation

@henriqueleote

Copy link
Copy Markdown

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/completions on 127.0.0.1:8080 and keeps one warm claude -p stream-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.
  • A third provider pill and a Bridge row in Settings > Meta AI: status, and a Start/Stop button that goes through Termux's RUN_COMMAND service (TermuxBridge.kt, one permission and a <queries> entry).
  • Tool calls through the bridge (music, memory, MCP) as a text protocol, and end_conversation decided by the model by meaning.
  • Vision.kt: a question the glasses read as describing an image (IMPLICIT_DESCRIBE_IMAGE) now asks for the photo.
  • New open_app phone tool ("open Spotify").
  • Strings in en, it, ru. SETUP.md has the Termux steps.

Caveats: experimental. Claude Code does not list Android as supported, plan limits apply, and the Start button needs allow-external-apps = true in Termux. Tested by hand on one pair of glasses and one phone; :app:assembleDebug passes on top of current main. The curl URL in SETUP.md points at my fork; change it if you merge.

Happy to split this up (bridge + provider, open_app, Vision fix) if you prefer smaller PRs.

@macedonga

Copy link
Copy Markdown
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 http://127.0.0.1:8080/v1. I'd also rather not ship a way to use a Claude subscription as an API in Visor, since I don't think Anthropic's terms allow it, so the bridge is better off in your own repo. If you'd like, open the IMPLICIT_DESCRIBE_IMAGE fix and open_app as separate PRs and I'll look at them.

@macedonga macedonga closed this Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants