> For the complete documentation index, see [llms.txt](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/sessions/phase40-session02-models-and-provider-readiness/tasks.md).

# Task Checklist

**Session ID**: `phase40-session02-models-and-provider-readiness` **Total Tasks**: 18 **Estimated Duration**: 3-4 hours **Created**: 2026-07-02

***

Legend: `[x]` completed; `[ ]` pending; `[P]` parallelizable; `[SNNMM]` session ref; `TNNN` task ID.

***

## Setup (2 tasks)

* [x] T001 \[S4002] Verify Session 01 invariants, current worktree status, and focused model/readiness owners before edits (`.spec_system/specs/phase40-session01-baseline-and-port-invariants/implementation-notes.md`)
* [x] T002 \[S4002] Capture current parser, bridge, demo fixture, hook, and readiness test baselines (`src/lib/__tests__/hermes-types.test.ts`)

***

## Foundation (5 tasks)

* [x] T003 \[S4002] \[P] Extend Hermes model client types for `default`, optional `context`, `mixtures`, and `configured` fields with types matching declared contract; exhaustive enum handling (`src/lib/hermes-types.ts`)
* [x] T004 \[S4002] \[P] Extend provider normalization, labels, OAuth/subscription IDs, and API-key readiness aliases for upstream and retained AI OS providers (`scripts/lib/hermes-provider-readiness.ts`)
* [x] T005 \[S4002] Implement tolerant model parser normalization for old AI OS, expanded AI OS, upstream no-`ok`, and invalid-shape cases with explicit error mapping (`src/lib/hermes-types.ts`)
* [x] T006 \[S4002] Update committed demo model fixtures with safe expanded fields and no local configured-provider summaries (`src/lib/hermes-demo-data.ts`)
* [x] T007 \[S4002] Preserve `useHermes` model query empty-state and demo behavior after parser normalization (`src/hooks/use-hermes.ts`)

***

## Implementation (6 tasks)

* [x] T008 \[S4002] Add safe Hermes config helpers for MoA mixture discovery with malformed/missing config fail-soft behavior (`scripts/lib/hermes-dev-bridge.ts`)
* [x] T009 \[S4002] Add configured-provider derivation from default provider, auth JSON provider keys, Hermes `.env`, config providers, and readiness classification (`scripts/lib/hermes-dev-bridge.ts`)
* [x] T010 \[S4002] Extend `/__hermes_models` output to include `ok`, `configuredDefault`, `default`, `catalog`, `mixtures`, and `configured` with bounded deterministic ordering (`scripts/lib/hermes-dev-bridge.ts`)
* [x] T011 \[S4002] Keep MoA mixtures available when configured-provider filtering narrows catalog providers (`scripts/lib/hermes-dev-bridge.ts`)
* [x] T012 \[S4002] Add no-leak safeguards so model output never includes raw config, auth JSON, env values, private paths, or token-shaped strings (`scripts/lib/hermes-dev-bridge.ts`)
* [x] T013 \[S4002] Update hook and parser fixtures for expanded model body compatibility (`src/hooks/__tests__/use-hermes.test.tsx`)

***

## Testing (5 tasks)

* [x] T014 \[S4002] \[P] Add parser tests for old AI OS, expanded AI OS, upstream no-`ok`, context, mixtures, configured, and invalid body cases (`src/lib/__tests__/hermes-types.test.ts`)
* [x] T015 \[S4002] \[P] Add bridge tests for provider aliases, configured derivation, MoA discovery, malformed config, missing config, and no-leak output (`scripts/lib/__tests__/hermes-dev-bridge.test.ts`)
* [x] T016 \[S4002] Run focused parser, bridge, and hook tests (`bunx vitest run scripts/lib/__tests__/hermes-dev-bridge.test.ts src/lib/__tests__/hermes-types.test.ts src/hooks/__tests__/use-hermes.test.tsx`)
* [x] T017 \[S4002] Run TypeScript gates for app and scripts (`bun run typecheck && bun run typecheck:scripts`)
* [x] T018 \[S4002] Validate ASCII, LF line endings, diff whitespace, and session artifact completeness (`.spec_system/specs/phase40-session02-models-and-provider-readiness`)

***

## Completion Checklist

* [x] All tasks marked `[x]`
* [x] All tests and checks passing
* [x] All files ASCII-encoded with LF line endings
* [x] implementation-notes.md updated
* [x] Ready for `creview` (next step in the implement -> creview -> validate sequence)

***

## Next Steps

Run the `creview` workflow step.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/sessions/phase40-session02-models-and-provider-readiness/tasks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
