Merge branch 'codex/20260912-model-capabilities-c48271f9-model-capabilities'
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
# Task: Inspect model capabilities across gateway server and client
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20260912-model-capabilities-c48271f9
|
||||
- Mode: Feature
|
||||
- Branch: codex/20260912-model-capabilities-c48271f9-model-capabilities
|
||||
- Worktree: D:\Datas\OthersProjects\.codex-worktrees\makelore\20260912-model-capabilities-c48271f9
|
||||
- Base commit: 70fa916edf74bf44308b279f90ccd945f8269f48
|
||||
- Owner: codex
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- Implement authoritative managed-model v2 import and persistence, provider input metadata, durable native reasoning choices, Main validation/frozen request context, Pi hook and child-worker propagation, runtime/image UI and focused unit/Electron coverage.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- The user approved the detailed design and requested implementation. Concurrent Task Gate and Planning Gate passed in this exact owned feature worktree before edits; start/status matched task/branch/base and peer records were read. Numerous historical placeholder peers remain unknown coordination state, with no unresolved concrete dependency blocking these isolated changes.
|
||||
- Applied maintain-project-docs from C:/Users/7brot/.codex/skills/maintain-project-docs. Relevant entry, task, positioning/decisions/architecture/domain/evidence and commitments were loaded. No subagents, main-checkout changes, canonical-memory promotion, deployment or paid inference calls.
|
||||
- Related task IDs: Works 20260912-model-capabilities-a7e194c2; one-api 20260912-model-capabilities-b6392e1d; Makelore 20260912-model-capabilities-c48271f9.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Managed niancode-user-models consumes only server v2 facts for image/reasoning capabilities. Missing/malformed capabilities stay unknown instead of borrowing local profiles; BYOK retains existing behavior. V2 public aliases and arbitrary native effort strings are preserved.
|
||||
- ProductModelRef durably stores default/disabled/enabled+native effort separately from the Pi carrier enum. Model switches reset managed choice to default; refresh-invalid choices and unsupported image submissions are rejected by Main before prompt acceptance.
|
||||
- Main writes a prepared managed request into the existing worker context, including child workers. The materialized Pi before_provider_request hook removes SDK-injected thinking controls and applies the frozen fields on each request/tool continuation. Default omits controls instead of accidentally disabling thinking.
|
||||
- Renderer menus show model default, switch options and original effort strings (including xhigh/new values). Main/provider descriptor and image attachment UI agree; the project model cards display authoritative capability summaries. Existing Web Search and provider refresh coordination are retained.
|
||||
- The legacy snapshot reducer rejected empty availableThinkingLevels, discovered by the new runtime test; managed snapshots now carry the separate capability field without emitting an invalid empty legacy enum list.
|
||||
|
||||
## Verification
|
||||
|
||||
- Task Documentation Gate: source changes reviewed and bundled task-aware documentation drift check passed. The result and this Ready for Integration record are committed together; registry completion follows the commit.
|
||||
|
||||
- 70 tests passed in 11 focused files covering managed normalization/options and actual Pi HTTP payload, provider projection/import, runtime persistence/invalid selection rejection, session registry, project config, extension host/bundle, provider refresh and composer behavior. The updated provider import test also passed separately after adding v2 persistence coverage.
|
||||
- Actual Electron E2E passed: v2 exposes native xhigh, submits {mode: enabled, effort: xhigh}, offers model-default/disabled, and disables image attachment for a text-only model.
|
||||
- pnpm run typecheck and pnpm run build:vite passed. Additional full Main tsc reported 61 diagnostics; an in-memory TypeScript baseline comparison against recorded base found the same 61 and zero additions. The temporary comparison script was removed.
|
||||
- HTTP serialization uses a local server and actual Pi 0.84.2 provider plus the materialized extension, covering default/disabled/enabled/low/medium/xhigh/max/future-native with Qwen and DeepSeek controls. No paid inference request was sent.
|
||||
- Git working and committed changes since the recorded base were inspected. Documentation drift and final committed ownership completion recorded below.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- Integrate alongside one-api and Works. Deployment acceptance must verify the real account catalog/group and provider HTTP responses. Existing 61 Main type errors are outside this change. Budget DTO is preserved with no first-delivery budget editor.
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- Promote v2 authority for managed modalities/reasoning, durable native product choice and Main-owned Pi payload preparation to canonical architecture/ADR/current-state during integration. Evidence: new actual HTTP test, runtime regression, Electron E2E and server/gateway linked tasks. User approved the design and implementation; BYOK and existing Web Search remain separate, with v1 reserved for older client support.
|
||||
Reference in New Issue
Block a user