Skip to content

Improved speak overall #1

Merged
zendrx merged 7 commits into
zendrx:masterfrom
slick-lab:master
May 27, 2026
Merged

Improved speak overall #1
zendrx merged 7 commits into
zendrx:masterfrom
slick-lab:master

Conversation

@zendrx

@zendrx zendrx commented May 27, 2026

Copy link
Copy Markdown
Owner

fixed the config system

. Removed user overrides completely. Now config.json only has detected and active sections. No merging. No confusion.

Fixed model.cr to write detected hardware first. Then it picks the right model from models.json based on available RAM. Then writes the selected model to active section. Works in one smooth flow.

  • Simplified config.cr. It only loads what is in the file. No auto-detection. No creation. No saving. Pure read-only loader.

  • Fixed speak.cr to check for config file first. If missing, runs setup. If exists, loads config and starts chat. Handles both first run and normal runs.

  • Added command line options. --setup forces setup. --auto-setup runs without user input. --coding optimizes model recommendations for coding tasks.

  • Fixed model.cr to embed models.json at compile time using read_file macro. No network request. No file I/O at runtime. Binary is self-contained.

  • Fixed context size calculation. Uses available RAM minus model weight divided by KV cache per token. Clamps between 512 and model's max context.

  • Fixed temperature type. Now Float64 everywhere. No mismatch between config.cr and model.cr.

  • Fixed free_disk_space_mb. Uses System.free_disk_space_mb("/") which returns UInt64. Matches config.cr ActiveSettings property type.

  • Fixed model_file path. Uses settings.model_file from config.active. Installer downloads to ./speak/models/filename.

  • Removed user_overrides struct entirely. No longer needed. Simpler code. Less bugs.

  • Removed apply_overrides method. No merging required. Config.active is the source of truth.

  • Removed save method from config.cr. Only model.cr writes to config.json. Separation of concerns.

  • The flow now is clean. First run: detect hardware -> write detected -> show model list -> user picks -> write active. Subsequent runs: load config -> read active -> load model -> start chat.

No more config.json corruption. No more override confusion. No more duplicate code.

@zendrx zendrx self-assigned this May 27, 2026
@zendrx zendrx merged commit 616d54f into zendrx:master May 27, 2026
4 of 6 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