[loop-generated] [refactor] Complete airllm removal from backends, agent, CLI and tests #486

Closed
opened 2026-03-19 19:50:20 +00:00 by Timmy · 3 comments
Owner

Problem

#459 removed airllm from the cascade router and #475 removed it from config.py, but substantial airllm code remains in:

Source (16 references)

  • src/timmy/backends.py — entire TimmyAirLLMAgent class, airllm_available() function
  • src/timmy/agent.py_resolve_backend() still handles airllm, create_timmy() still supports it
  • src/timmy/cli.py — CLI help text still references airllm
  • src/timmy/tools_intro/__init__.py — mention in docstring

Tests (45+ references)

  • tests/timmy/test_agent.py — 6 airllm test functions
  • tests/timmy/test_backends.py — 10 airllm test functions
  • tests/timmy/test_cli.py — 1 airllm CLI test
  • tests/dashboard/test_mobile_scenarios.py — 4 airllm mobile tests
  • tests/infrastructure/test_router_cascade.py — 2 airllm cascade tests
  • tests/conftest.py — airllm stub in sys.modules

Scope

This is a larger cleanup (~60 references across ~10 files). Suitable for Kimi delegation.

Acceptance Criteria

  • Remove TimmyAirLLMAgent class from backends.py
  • Remove airllm_available() from backends.py
  • Remove airllm handling from _resolve_backend() and create_timmy() in agent.py
  • Remove airllm CLI options from cli.py
  • Remove all airllm-specific tests
  • Remove airllm stub from conftest.py
  • Remove auto backend option (which was only for airllm detection)
  • Update Literal types to remove airllm and auto
  • All tests pass (tox -e unit)
  • Net negative lines of code
## Problem #459 removed airllm from the cascade router and #475 removed it from config.py, but substantial airllm code remains in: ### Source (16 references) - `src/timmy/backends.py` — entire `TimmyAirLLMAgent` class, `airllm_available()` function - `src/timmy/agent.py` — `_resolve_backend()` still handles airllm, `create_timmy()` still supports it - `src/timmy/cli.py` — CLI help text still references airllm - `src/timmy/tools_intro/__init__.py` — mention in docstring ### Tests (45+ references) - `tests/timmy/test_agent.py` — 6 airllm test functions - `tests/timmy/test_backends.py` — 10 airllm test functions - `tests/timmy/test_cli.py` — 1 airllm CLI test - `tests/dashboard/test_mobile_scenarios.py` — 4 airllm mobile tests - `tests/infrastructure/test_router_cascade.py` — 2 airllm cascade tests - `tests/conftest.py` — airllm stub in sys.modules ## Scope This is a larger cleanup (~60 references across ~10 files). Suitable for Kimi delegation. ## Acceptance Criteria - Remove `TimmyAirLLMAgent` class from backends.py - Remove `airllm_available()` from backends.py - Remove airllm handling from `_resolve_backend()` and `create_timmy()` in agent.py - Remove airllm CLI options from cli.py - Remove all airllm-specific tests - Remove airllm stub from conftest.py - Remove `auto` backend option (which was only for airllm detection) - Update Literal types to remove `airllm` and `auto` - All tests pass (`tox -e unit`) - Net negative lines of code
Author
Owner

Instructions for Kimi

Complete removal of all airllm references from the codebase.

Source changes:

  1. src/timmy/backends.py: Remove airllm_available(), TimmyAirLLMAgent class, _AIRLLM_MODELS dict, and all airllm imports
  2. src/timmy/agent.py: Remove airllm from _resolve_backend() (remove the Apple Silicon + airllm branch), remove airllm from create_timmy(), update type hints
  3. src/timmy/cli.py: Remove airllm from --backend help text, remove --model-size option
  4. src/timmy/tools_intro/__init__.py: Remove airllm mention from docstring

Test changes:

  1. tests/conftest.py: Remove airllm from the sys.modules stub list
  2. tests/timmy/test_agent.py: Remove all airllm test functions (test_create_timmy_airllm_, test_resolve_backend_auto_uses_airllm_, etc)
  3. tests/timmy/test_backends.py: Remove all airllm test functions
  4. tests/timmy/test_cli.py: Remove the airllm CLI test
  5. tests/dashboard/test_mobile_scenarios.py: Remove M601-M604 airllm tests
  6. tests/infrastructure/test_router_cascade.py: Remove test_check_airllm_* tests

Important:

  • Also remove auto from timmy_model_backend Literal if it only existed for airllm detection
  • Keep is_apple_silicon() if used elsewhere
  • Verify: tox -e unit
  • Target: net negative LOC
## Instructions for Kimi Complete removal of all airllm references from the codebase. ### Source changes: 1. `src/timmy/backends.py`: Remove `airllm_available()`, `TimmyAirLLMAgent` class, `_AIRLLM_MODELS` dict, and all airllm imports 2. `src/timmy/agent.py`: Remove airllm from `_resolve_backend()` (remove the Apple Silicon + airllm branch), remove airllm from `create_timmy()`, update type hints 3. `src/timmy/cli.py`: Remove airllm from --backend help text, remove --model-size option 4. `src/timmy/tools_intro/__init__.py`: Remove airllm mention from docstring ### Test changes: 5. `tests/conftest.py`: Remove `airllm` from the sys.modules stub list 6. `tests/timmy/test_agent.py`: Remove all airllm test functions (test_create_timmy_airllm_*, test_resolve_backend_auto_uses_airllm_*, etc) 7. `tests/timmy/test_backends.py`: Remove all airllm test functions 8. `tests/timmy/test_cli.py`: Remove the airllm CLI test 9. `tests/dashboard/test_mobile_scenarios.py`: Remove M601-M604 airllm tests 10. `tests/infrastructure/test_router_cascade.py`: Remove test_check_airllm_* tests ### Important: - Also remove `auto` from `timmy_model_backend` Literal if it only existed for airllm detection - Keep `is_apple_silicon()` if used elsewhere - Verify: `tox -e unit` - Target: net negative LOC
kimi was assigned by Timmy 2026-03-19 19:50:21 +00:00
kimi was unassigned by Timmy 2026-03-19 23:25:04 +00:00
Timmy self-assigned this 2026-03-19 23:25:04 +00:00
Timmy removed their assignment 2026-03-19 23:28:10 +00:00
kimi was assigned by Timmy 2026-03-19 23:28:10 +00:00
kimi was unassigned by Timmy 2026-03-20 00:21:26 +00:00
Timmy self-assigned this 2026-03-20 00:21:26 +00:00
Timmy removed their assignment 2026-03-20 00:23:05 +00:00
kimi was assigned by Timmy 2026-03-20 00:23:05 +00:00
Author
Owner

Updated scope — this is bigger than expected.

Files to modify:

  1. src/timmy/backends.py — Remove _AIRLLM_MODELS, ModelSize, airllm_available(), is_apple_silicon(), TimmyAirLLMAgent class (lines 26-148). Remove import platform and from typing import Literal. Fix docstring.
  2. src/timmy/agent.py — Remove all airllm imports, references in _resolve_backend(), create_timmy() airllm branch. Fix docstrings.
  3. src/timmy/cli.py — Remove airllm from help text.
  4. src/timmy/__init__.py — Fix docstring.
  5. src/timmy/tools_intro/__init__.py — Remove airllm from comment.
  6. tests/conftest.py — Remove airllm stub (line 21).
  7. tests/timmy/test_backends.py — Remove ALL airllm test functions (lines 41-215+).
  8. tests/timmy/test_agent.py — Remove airllm test functions and references.
  9. tests/timmy/test_cli.py — Remove airllm CLI test.
  10. tests/dashboard/test_mobile_scenarios.py — Remove M6xx section entirely.

Run tox -e unit — all tests must pass. Branch: kimi/issue-486

**Updated scope — this is bigger than expected.** Files to modify: 1. `src/timmy/backends.py` — Remove `_AIRLLM_MODELS`, `ModelSize`, `airllm_available()`, `is_apple_silicon()`, `TimmyAirLLMAgent` class (lines 26-148). Remove `import platform` and `from typing import Literal`. Fix docstring. 2. `src/timmy/agent.py` — Remove all airllm imports, references in `_resolve_backend()`, `create_timmy()` airllm branch. Fix docstrings. 3. `src/timmy/cli.py` — Remove airllm from help text. 4. `src/timmy/__init__.py` — Fix docstring. 5. `src/timmy/tools_intro/__init__.py` — Remove airllm from comment. 6. `tests/conftest.py` — Remove airllm stub (line 21). 7. `tests/timmy/test_backends.py` — Remove ALL airllm test functions (lines 41-215+). 8. `tests/timmy/test_agent.py` — Remove airllm test functions and references. 9. `tests/timmy/test_cli.py` — Remove airllm CLI test. 10. `tests/dashboard/test_mobile_scenarios.py` — Remove M6xx section entirely. Run `tox -e unit` — all tests must pass. Branch: `kimi/issue-486`
kimi was unassigned by Timmy 2026-03-20 00:44:34 +00:00
Timmy closed this issue 2026-03-20 00:46:22 +00:00
Author
Owner

Closing — airllm has already been fully removed from source, tests, and config. The only remaining reference is a test fixture string in tests/loop/test_cycle_retro.py:78 that references the historical PR title [loop-cycle-538] refactor: remove dead airllm (#459) (#481) — this is test data, not dead code. All acceptance criteria are met.

Closing — airllm has already been fully removed from source, tests, and config. The only remaining reference is a test fixture string in `tests/loop/test_cycle_retro.py:78` that references the historical PR title `[loop-cycle-538] refactor: remove dead airllm (#459) (#481)` — this is test data, not dead code. All acceptance criteria are met.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#486