Skip to content

feat(ai): simplify model selection and add turn usage metrics - #3281

Merged
GCWing merged 3 commits into
mainfrom
gcwing/dev
Oct 7, 2026
Merged

GCWing merged 3 commits into
mainfrom
gcwing/dev

Conversation

@GCWing

@GCWing GCWing commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Model selection and model setup now keep the controls and model context together, and completed chat turns expose their reported usage.

  • Expand model modes and reasoning choices in place, preserve keyboard focus and retry context, remember the manual model, and collapse after persistence succeeds. Adapter-reported effort aliases simplify the display while keeping existing preset IDs and request actions intact.
  • Organize model settings around acquisition, selection modes, and a searchable model pool with capability/provider filters, default-role badges, per-model tags, and shared action controls. Tags remain annotations and preserve legacy/unknown metadata during edits. Smart/Battery routing and automatic tag synchronization remain explicitly unavailable.
  • Show completed-turn token usage, cache-hit ratio, and average output rate. The rate uses whole-turn duration, including tools and waits. Unknown telemetry stays unknown. Shared Tooltips support click pinning and immediate scroll dismissal; historical footers reveal through temporary hover/focus leases without reprojecting the transcript.
  • Add the shared IconButton annotation variant and keep Design Lab previews and all three locales aligned with the published components.

Type and Areas

Type: Feature, UI/UX, compatibility, tests.

Areas: Web UI, shared design system, Design Lab, AI adapters, shared AI DTOs, Remote Connect catalog fixture.

Motivation / Impact

Users can configure and find models in one pool, adjust thinking without leaving the selector, and inspect actual turn usage. Existing provider/model/account identity, model defaults, saved reasoning IDs, and request semantics remain compatible.

Verification

PR CI passed all 11 applicable checks; 2 jobs were skipped by the existing impact rules. Full Web UI testing passed 942 files and 10,448 tests.

Passed locally:

  • pnpm.cmd run check:web (type checking, Appearance, typography, all-surface color audits, and theme contracts).
  • pnpm.cmd run i18n:audit, pnpm.cmd run motion:audit, and pnpm.cmd --dir src/web-ui run icons:check.
  • Focused Web UI tests: 24 affected/related test files with 481 passing tests; settings, draft, and picker tests: 30 files with 183 passing tests.
  • pnpm.cmd --dir src/web-ui exec vitest run --maxWorkers=50% src/flow_chat/components/FlowChatTypographyRoles.test.ts (6 tests covering shared menu/metric typography and accessible completion details).
  • Focused shared UI Node tests for IconButton, Icon, Tooltip, registry, and turn metrics.
  • pnpm.cmd --dir design-system/apps/design-lab run build and focused preview/i18n contracts (49 passing tests).
  • cargo test --locked -p openbitfun-ai-adapters --lib models_dev::tests (32 tests).
  • cargo test --locked -p openbitfun-core-types --lib remote_model_routing_compatibility (2 legacy/current payload tests).
  • cargo test --locked -p openbitfun-core --no-default-features --features ai-adapter-runtime --lib infrastructure::ai::reasoning_catalog (11 tests).
  • cargo test --locked -p openbitfun-services-integrations --no-default-features --features remote-connect --test remote_connect_contracts remote_connect_model_catalog_builder_preserves_config_shape (1 test).
  • Staged/base diff checks, Git object-size policy, and merge-tree conflict check.

Reviewer Notes

Windows desktop library tests hit the existing upstream Tauri test-loader limitation before execution. The workflow accepted its exact documented loader signature; Windows compilation, CLI, and the other platform contracts passed. Linux and macOS desktop library tests passed.

AI-assisted; focused automated testing completed. No browser automation, mock visual acceptance, native/device visual validation, or live-provider inference was performed.

Remote workspace, Remote control, Peer Device Mode, and Detached Dispatch were not exercised live. Target-owned/external selector behavior, optional-field wire compatibility, and the Remote Connect catalog shape have automated coverage; these checks do not establish live remote behavior.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

GCWing added 3 commits October 6, 2026 09:25
Keep model and reasoning selection in one card with provider context, guarded async saves, and a reasoning intensity slider.

Add turn token/cache/output-rate metrics, hover-aware footers, and shared click-open tooltips that dismiss on scrolling.
@GCWing
GCWing merged commit dacba0e into main Oct 7, 2026
13 checks passed
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.

1 participant