Skip to content

theinterneti/TTA.dev / .claude/skills/generated/llm

Llm subsystem in TTA.dev: execute and related code. 171 symbols | 30 files | Cohesion: 67%

Llm

171 symbols | 30 files | Cohesion: 67%

When to Use

  • Working on llm-related functionality in TTA.dev
  • Modifying execute
  • Navigating ttadev/primitives/llm/hardware_detector.py, ttadev/primitives/llm/ollama_primitive.py

Key Files

FileSymbols
tests/primitives/llm/test_model_router.py_make_router, _ctx, test_raises_value_error_for_unknown_mode, test_error_message_lists_available_modes, test_calls_ollama_and_returns_response (+27)
tests/primitives/llm/test_task_selector.pytest_known_coding_model_scores_above_zero, test_returns_float_between_0_and_1, test_gemini_flash_scores_for_coding, test_unknown_model_with_large_params_scores_above_tiny, test_completely_unknown_model_gets_minimal_score (+11)
ttadev/primitives/llm/hardware_detector.pymax_params_b, summary, to_dict, detect, filter_ollama_models (+10)
ttadev/primitives/llm/ollama_primitive.py_get_client, _list_models, _running_models, _show_model, _pull_model (+6)
tests/primitives/llm/test_hardware_detector.pytest_detect_cached, test_detect_force_re_reads, _profile, test_can_run_small_model_on_4gb_gpu, test_cannot_run_70b_on_4gb_gpu_limited_ram (+5)
ttadev/primitives/llm/provider_dispatch.pybuild_openai_tool_kwargs, call_openai_compat, call_openai, call_openrouter, call_xai (+4)
tests/primitives/llm/test_model_advisor.pytest_recommend_tier_threshold_met_returns_valid_model, test_recommend_tier_ollama_preferred_when_score_meets_threshold, _make_tier_map, test_recommend_tier_returns_tier_recommendation, test_recommend_tier_no_threshold_met_returns_best_available (+4)
ttadev/primitives/llm/model_registry.py_list, _has_benchmark, _select, _key, _get (+3)
ttadev/primitives/llm/task_selector.pygeneral, _extract_param_size_b, score_model_for_task, sort_key, coding (+2)
tests/primitives/llm/test_free_model_tracker.py_make_httpx_response, test_returns_only_free_models, test_passes_api_key_as_auth_header, test_no_api_key_sends_no_auth_header, test_handles_null_pricing_gracefully (+2)

Entry Points

Start here when exploring this area:

  • execute (Function) — ttadev/primitives/llm/model_router.py:351
  • test_raises_value_error_for_unknown_mode (Function) — tests/primitives/llm/test_model_router.py:164
  • test_error_message_lists_available_modes (Function) — tests/primitives/llm/test_model_router.py:173
  • test_calls_ollama_and_returns_response (Function) — tests/primitives/llm/test_model_router.py:187
  • test_ollama_tier_without_model_raises (Function) — tests/primitives/llm/test_model_router.py:210

Key Symbols

SymbolTypeFileLine
executeFunctionttadev/primitives/llm/model_router.py351
test_raises_value_error_for_unknown_modeFunctiontests/primitives/llm/test_model_router.py164
test_error_message_lists_available_modesFunctiontests/primitives/llm/test_model_router.py173
test_calls_ollama_and_returns_responseFunctiontests/primitives/llm/test_model_router.py187
test_ollama_tier_without_model_raisesFunctiontests/primitives/llm/test_model_router.py210
test_calls_openrouter_with_pinned_modelFunctiontests/primitives/llm/test_model_router.py224
test_openrouter_without_model_uses_trackerFunctiontests/primitives/llm/test_model_router.py247
test_auto_uses_tracker_to_pick_modelFunctiontests/primitives/llm/test_model_router.py280
test_falls_through_to_next_tier_on_failureFunctiontests/primitives/llm/test_model_router.py313
test_raises_runtime_error_when_all_tiers_failFunctiontests/primitives/llm/test_model_router.py356
test_raises_runtime_error_when_no_tiersFunctiontests/primitives/llm/test_model_router.py378
test_override_skips_to_specified_tierFunctiontests/primitives/llm/test_model_router.py392
test_override_out_of_range_raises_value_errorFunctiontests/primitives/llm/test_model_router.py413
test_unknown_provider_raises_runtime_errorFunctiontests/primitives/llm/test_model_router.py427
test_calls_groq_with_pinned_modelFunctiontests/primitives/llm/test_model_router.py455
test_groq_defaults_to_first_free_model_when_no_modelFunctiontests/primitives/llm/test_model_router.py482
test_calls_together_with_pinned_modelFunctiontests/primitives/llm/test_model_router.py514
test_together_without_model_raisesFunctiontests/primitives/llm/test_model_router.py543
test_bare_model_id_gets_models_prefixFunctiontests/primitives/llm/test_model_router.py589
test_model_with_prefix_is_not_double_prefixedFunctiontests/primitives/llm/test_model_router.py614

Execution Flows

FlowTypeSteps
Main → _build_messagescross_community7
Main → Resolve_model_idcross_community7
Handle_model_command → Rank_models_for_taskcross_community6
Handle_model_command → _classify_entrycross_community6
Get_ranked_openhands_free_models → Resolve_model_idcross_community6
Llm_hardware_profile → _runcross_community6
Llm_viable_ollama_models → _runcross_community6
Test_router_ollama_skip_small → _build_messagescross_community6
Test_router_ollama_allow_large → _build_messagescross_community6
Main → _build_kwargscross_community4

Connected Areas

AreaConnections
Unit18 calls
Tests1 calls
Integration1 calls
Model_advisor1 calls
Cli1 calls
Control_plane1 calls

How to Explore

  1. gitnexus_context({name: "execute"}) — see callers and callees
  2. gitnexus_query({query: "llm"}) — find related execution flows
  3. Read key files listed above for implementation details
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 318kUpdated Claude CodeCodexUnverifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 318kUpdated Claude CodeCodexUnverifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 318kUpdated Claude CodeCodexUnverifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 318kUpdated Claude CodeCodexUnverifiedInstall