Repository navigation
fix: render full model names, load the real catalog, add thinking-effort picker - #1
Open
windfallscout wants to merge 5 commits into
Open
windfallscout wants to merge 5 commits into
windfallscout wants to merge 5 commits into
Conversation
- Model selector rows wrap long ids instead of ellipsizing, provider headers fill the sheet width, and the top-bar chip is width-bounded with a tooltip showing the full provider:model string. - The model list now comes from GET /api/providers, enriched per keyed provider from GET /api/models/live with an 8s budget (static models are the fallback), so providers such as opencode-go are visible again. GET /api/model/options stays as a 404/405 fallback for older servers. - Thinking effort (low/medium/high/xhigh) is selectable in the sheet: it switches to a catalog sibling when the provider encodes effort in the model id, otherwise it sends /reasoning <level> (--global for the default scope). - Tests: pure mapping/effort helpers, MockWebServer coverage for the new endpoints, selector tests with 40-80 char names, ChatViewModel effort tests and Compose UI tests for the wrapped rows and the bounded chip. - CI uploads the debug APK as an artifact so a build can be installed without a local toolchain.
The per-provider timeout ran on the caller's dispatcher, so kotlinx-coroutines virtual time in runTest fired it immediately and the live models were dropped. Run the enrichment on Dispatchers.IO (wall clock), and print full assertion messages from the unit-test tasks so a CI failure is diagnosable.
…rors
/api/providers and /api/models/live publish `models` as objects
({"id": "...", "label": "..."}), but both DTOs declared List<String>, so
kotlinx.serialization threw and the whole provider list failed to decode —
no opencode-go, empty picker. ModelIdDto now accepts an object or a plain
string, so older servers keep working; ModelCatalog reduces entries to ids.
The chat model sheet also gets real catalog state: a failed fetch clears any
pending spinner and shows the error with Retry instead of an empty sheet, and
the Models screen error state gets the same Retry action.
…ture Each ephemeral Actions runner generated a fresh ~/.android/debug.keystore, so consecutive hermes-debug-apk artifacts carried different signatures and Android required an uninstall before the next debug build could be installed. - add app/debug.keystore: debug-only PKCS12 key (alias androiddebugkey, RSA 2048, valid to 2056, public "android" password — not a release secret) and un-ignore it in .gitignore - point signingConfigs.debug at it so local and CI debug builds share the same certificate; release/beta signing is untouched - CI asserts the assembled APK's signer SHA-256 against the pinned fingerprint, so an accidental revert to an ephemeral key fails the build instead of silently changing the signature Devices carrying a debug build installed before this change need one final uninstall to pick up the new key.
The first version piped `apksigner verify --print-certs` straight into sed, so an empty match ended in a bare `test` failure with no clue why: the step logged "APK signer SHA-256: " and nothing else. Capture stdout+stderr, echo the full apksigner output, and match the digest line case-insensitively with a `.*digest:` strip so indentation, label casing and colon-separated fingerprints all parse. A missing digest or a non-zero apksigner exit now prints the raw output and an annotated ::error::.
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.
What
Three related fixes to the model selector, plus a CI artifact so the build is testable without a local toolchain.
1. Long model names are no longer truncated
provider:modelid (nomaxLines = 1+ ellipsis), so 40–80 char ids wrap instead of being cut mid-name.currentmarker moved to the secondary line (with the provider and the parsed effort), so a long name can never hide it.widthIn(max = 140.dp), single line, ellipsis) and wrapped in aTooltipBox/PlainTooltipshowing the fullprovider:modelon long-press.provider:model.2. Model list loads from the endpoints the server actually serves
The app called
GET /api/model/options, which hermes-webui does not serve (404) — that is why providers such asopencode-gowere missing and the list could come back empty/erroring.GET /api/providersis now the source (id→slug,display_name→name,active_provider→is_current).GET /api/models/live?provider=<slug>with an 8s per-provider budget; a slow or failing provider keeps its static list.GET /api/model/optionsremains only as a 404/405 fallback for older servers.POST /api/model/setis unchanged.3. Thinking effort is selectable from the selector
Thinking effortrow (Low / Med / High / XHigh) in a horizontally scrollable chip row, so it cannot overflow narrow screens.claude-opus-5-5-high,gemini-4-hydrogen-xhigh), picking a level switches to the sibling model./reasoning <level>slash command —/reasoning <level> --globalwhen the sheet scope is Default.Tests
ModelCatalogTest— mapping, merge/dedupe, live-target selection, fallback policy.HermesRestApiModelsTest— MockWebServer: providers + live merge, 404 → legacy fallback, live 500 → static models.EffortTest— suffix parsing, effective effort, sibling resolution, labels.ModelSelectorTest— 40–80 char names,provider:modelsearch, per-row effort.ChatViewModelTest— sibling switch,/reasoningfallback,--global+ error surfacing.ModelSelectorUiTest(androidTest) — rows inside a 320dp container, chip width bound.No JDK/Android SDK on the machine that produced this branch, so the build was not run locally — CI (
assembleDebug+testDebugUnitTest) is the verification. The CI job now uploadsapp-debug.apkas thehermes-debug-apkartifact.Note:
CONTRIBUTING.mdasks for PRs intodev; this targetsmainas requested.