Skip to content

feat(migrations): update schema version to 3 and retire chat-v1 model#2337

Merged
M3gA-Mind merged 2 commits into
tinyhumansai:mainfrom
M3gA-Mind:feat/checks-all
May 20, 2026
Merged

feat(migrations): update schema version to 3 and retire chat-v1 model#2337
M3gA-Mind merged 2 commits into
tinyhumansai:mainfrom
M3gA-Mind:feat/checks-all

Conversation

@M3gA-Mind
Copy link
Copy Markdown
Contributor

@M3gA-Mind M3gA-Mind commented May 20, 2026

Summary

  • Retires chat-v1 as the default model: the backend removed it from its strict model registry, causing new sub-agent spawns (new inference threads) to receive 400 errors
  • Updates DEFAULT_MODEL constant to reasoning-quick-v1 (Kimi K2.6 Turbo on Fireworks — same underlying model chat-v1 previously aliased to)
  • Adds schema migration 2 → 3 (retire_chat_v1_model) that remaps any persisted config.default_model = "chat-v1" to "reasoning-quick-v1" on next launch
  • Remaps hint:chat in the OpenHuman backend provider factory to reasoning-quick-v1 as well

Test plan

  • Unit tests in retire_chat_v1_model.rs: remap when chat-v1, idempotent when already reasoning-quick-v1, no-op on None and other model values
  • Migration integration tests in mod_tests.rs: fresh install and upgrade from v0 all advance to schema_version=3
  • cargo test passes
  • Existing workspace with default_model = "chat-v1" in config.toml is migrated to reasoning-quick-v1 on launch

Summary by CodeRabbit

  • Chores
    • Default AI model changed from chat-v1 to reasoning-quick-v1
    • Existing configurations using chat-v1 are automatically remapped to reasoning-quick-v1 on next launch
    • Model selection logic updated to reflect the new default
    • Full backward compatibility ensured—no user action required

Review Change Stack

M3gA-Mind added 2 commits May 20, 2026 16:30
- Changed the default model from `chat-v1` to `reasoning-quick-v1` due to backend removal of `chat-v1` from the model registry.
- Updated migration logic to remap persisted configurations and increment schema version to 3.
- Adjusted tests to reflect the new schema version and ensure proper migration behavior.
@M3gA-Mind M3gA-Mind requested a review from a team May 20, 2026 11:08
@M3gA-Mind M3gA-Mind merged commit 41e7631 into tinyhumansai:main May 20, 2026
22 of 24 checks passed
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f9918a97-781e-4dc9-b085-971fd199ae75

📥 Commits

Reviewing files that changed from the base of the PR and between ebd6457 and 086218b.

📒 Files selected for processing (5)
  • src/openhuman/config/schema/types.rs
  • src/openhuman/inference/provider/factory.rs
  • src/openhuman/migrations/mod.rs
  • src/openhuman/migrations/mod_tests.rs
  • src/openhuman/migrations/retire_chat_v1_model.rs

📝 Walkthrough

Walkthrough

This PR retires the chat-v1 model by updating the default model selection and hint routing to use reasoning-quick-v1, implements a versioned configuration migration that persists the change for existing configs, and verifies the entire migration lifecycle through test coverage.

Changes

Chat-v1 Model Retirement and Migration

Layer / File(s) Summary
Model default and hint routing updates
src/openhuman/config/schema/types.rs, src/openhuman/inference/provider/factory.rs
DEFAULT_MODEL constant updated from MODEL_CHAT_V1 to MODEL_REASONING_QUICK_V1 with retired model documentation; hint:chat routing remapped to MODEL_REASONING_QUICK_V1 in the backend factory.
Chat-v1 retirement migration module
src/openhuman/migrations/retire_chat_v1_model.rs
New migration module introduces MigrationStats struct and run function to remap default_model from chat-v1 to reasoning-quick-v1 in-memory with info/debug logging; includes unit tests for remapping, preservation of other model values, None handling, and idempotence.
Migration system versioning and wiring
src/openhuman/migrations/mod.rs
CURRENT_SCHEMA_VERSION bumped from 2 to 3; retire_chat_v1_model module registered; run_pending startup runner extended with schema_version==2 gate that executes the migration, persists the config, and rolls back the in-memory version on save failure with retry-on-next-launch semantics.
Migration lifecycle test coverage
src/openhuman/migrations/mod_tests.rs
Migration integration tests updated to expect schema_version 3, verifying version advancement from older schemas, successful versioning on fresh installs, and idempotent behavior on repeated invocations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

agent, working

Poem

🐰 whiskers twitch with glee
Chat-v1 hops away with grace,
Quick reasoning takes its place—
Configs migrate, smooth as tea,
Schema v3, wild and free! 🚀


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added agent Built-in agents, prompts, orchestration, and agent runtime in src/openhuman/agent/. working A PR that is being worked on by the team. labels May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Built-in agents, prompts, orchestration, and agent runtime in src/openhuman/agent/. working A PR that is being worked on by the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant