Skip to content

Conversation

@debv
Copy link

@debv debv commented Dec 10, 2025

Pull Request: UI Clean Up, Support Free Models & Addition of Developer Tools

Summary

This PR brings improvements to the Liminal Backrooms project, focusing on four main areas:

  1. Free Model Support - Added support for using free models from OpenRouter with live validation
  2. Enhanced Developer Tools - New debugging utilities for development and troubleshooting
  3. Dependency & Compatibility Fixes - Windows compatibility, proper Poetry setup, and cleaner git tracking
  4. UI Cleanup - Made UI styling consistent across elements, app and generated files

Key Changes

Model Dropdown Improvements

  • Hierarchical structure: Models organized by Tier (Paid/Free) > Provider > Model
  • Model ID visibility: Display name now shows model ID (e.g., "DeepSeek R1 (deepseek-ai/deepseek-r1)")
  • Alphabetical sorting: Providers sorted A-Z within each tier
  • Live validation: model_updater.py validates models against OpenRouter API (cached 24h)

Developer Tools (tools/ directory)

New debugging utilities for development:

  • debug_tools.py - Comprehensive debug panel with logging, state inspection, and diagnostics
  • freeze_detector.py - Detects and reports UI freezes during development
  • model_updater.py - Validates curated model list against OpenRouter API
  • check_developer_tools.py - Quick check for DEVELOPER_TOOLS flag status

All debug output is suppressed when DEVELOPER_TOOLS = False in config.py.

UI Enhancements

  • New GroupedModelComboBox - Custom dropdown widget supporting hierarchical model selection
  • Centralized styles - New styles.py for consistent theming
  • App icon - Added assets/app-icon.ico

Dependency & Build Fixes

  • Poetry compatibility: Added package-mode = false to fix poetry install errors
  • New dependency: duckduckgo-search for web search feature
  • Regenerated poetry.lock to sync with pyproject.toml changes

Windows Compatibility

  • Replaced Unicode box-drawing characters with ASCII alternatives
  • Fixes display issues on Windows terminals that don't support UTF-8

Git Hygiene

Updated .gitignore to exclude:

  • Generated HTML files at root (/*.html)
  • User-specific settings (settings/splitter_state.json)
  • Claude Code config (.claude/)
  • Temporary diff files (diff_*.txt, DIFF_*.md)
  • Generated benchmark reports (except LEADERBOARD.md and leaderboard.json)

Removed from tracking:

  • conversation_full.html (generated output)
  • settings/splitter_state.json (user-specific UI state)

Testing these new changes

  • poetry install completes without errors
  • Application launches successfully
  • Model dropdowns display correctly with hierarchical structure
  • Free models appear and are selectable
  • Model validation runs on startup (when network available)
  • Debug tools work when DEVELOPER_TOOLS = True
  • No debug output when DEVELOPER_TOOLS = False

Testing to confirm rebase is all good (i.e. latest features added to upstream repo still work)

  • Backrooms bench feature available and working
  • AI aware of and able to use !prompt, !search and !temperature commands

Future Improvements

  • Better code organization (lots of huge files that can be broken up, didn't want to create an even bigger PR so will do later)
  • Add tests

Screenshots

Feature/View Before After
App UI populated-chat inline-images
Images Tab images-tab images-tab
HTML Conversation html html
UI Debugger -- docked-debuggerundocked-debugger

debv added 23 commits December 9, 2025 22:05
- Added backroomsbench.py (674 lines) from upstream
- Updated command handlers to match upstream's better implementation:
  - !search: Now adds results to conversation context (all AIs can see)
  - !prompt: Changed to list-based additions (appends, doesn't replace)
  - !temperature: Now adds subtle notification to conversation
- Added helper methods:
  - get_prompt_additions_for_ai(): Formats prompt additions as list
  - get_temperature_for_ai(): Returns custom temperature or default
- Adapted upstream logic for MessageWidget architecture:
  - Search results trigger conversation redisplay
  - Prompt/temperature changes trigger UI updates
  - Subtle notifications added to main_conversation
- Changed ai_prompt_modifications to ai_prompt_additions (list-based)
- Updated ai_turn() to append prompt additions instead of replacing
- All command handlers now properly integrate with conversation flow
- All scenarios now document !search, !prompt, !temperature commands
- AIs now know they can search the web for current information
- AIs know they can modify their own system prompts
- AIs know they can adjust their sampling temperature
- D&D scenarios already included (identical to what we added)
- 76 mentions of new commands vs 10 previously
- Upstream config.py is 1022 lines vs our 886 lines

This is critical - without these prompt updates, AIs wouldn't know
the new tools are available to them!
…g.py

Added compatibility functions to work with our local imports:
- DEVELOPER_TOOLS = False (used by freeze detector)
- get_model_tier_by_id() function (used by grouped_model_selector.py)

These were missing from upstream config.py but required by our codebase.
Added to upstream config.py:
- OUTPUTS_DIR = 'outputs' (for HTML export)
- get_model_id() function (for model name -> ID lookup)
- get_invite_models_text() function (for AI model invitation with tier filtering)

These were imported by gui.py, main.py, grouped_model_selector.py, and shared_utils.py
but missing from upstream config.py.
CRITICAL FIXES:
1. Added 28 missing free models (was 3, now 31 total)
   - Meta: Llama 3.3 70B, Llama 3.2 3B
   - Google: 6 Gemma/Gemini models
   - Qwen: 3 models
   - Mistral AI: 3 models
   - NVIDIA: 2 Nemotron models
   - OpenAI: 2 GPT OSS models
   - Plus 11 more providers

2. Integrated tools/model_updater.py validation
   - Validates models against OpenRouter API
   - Caches results for 24 hours
   - Automatically removes 404'd models
   - _CURATED_MODELS -> validate_models() -> AI_MODELS

Free models organized by provider:
- Meta (2), Google (6), Qwen (3), Mistral AI (3)
- NVIDIA (2), OpenAI (2), Moonshot AI (1)
- Nous Research (1), Meituan (1), TNG Technology (3)
- Allen AI (1), xAI (1), Amazon (1), Arcee AI (1)
- Alibaba (1), KwaiPilot (1), Cognitive Computations (1)

Total models: 71 (40 Paid + 31 Free)
@debv debv changed the title Fix/dependencies and free models UI Clean Up, Support Free Models & Addition of Developer Tools Dec 10, 2025
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