Debug exactly what keys chuk-llm 0.7 uses for models.
()
| 210 | |
| 211 | |
| 212 | def debug_model_key_structure(): |
| 213 | """Debug exactly what keys chuk-llm 0.7 uses for models.""" |
| 214 | print("\n🔍 Key Structure Analysis:") |
| 215 | |
| 216 | try: |
| 217 | from chuk_llm.llm.client import list_available_providers |
| 218 | |
| 219 | providers_info = list_available_providers() |
| 220 | |
| 221 | for name, info in list(providers_info.items())[:3]: # Just first 3 |
| 222 | print(f"\n{name}:") |
| 223 | print(f" All keys: {list(info.keys())}") |
| 224 | |
| 225 | # Check each possible model key |
| 226 | for key in ["models", "available_models", "model_list", "supported_models"]: |
| 227 | if key in info: |
| 228 | models = info[key] |
| 229 | print(f" ✅ {key}: {type(models)} with {len(models)} items") |
| 230 | if isinstance(models, list) and models: |
| 231 | print(f" First few: {models[:3]}") |
| 232 | else: |
| 233 | print(f" ❌ {key}: not found") |
| 234 | |
| 235 | except Exception as e: |
| 236 | print(f"❌ Error in key structure analysis: {e}") |
| 237 | |
| 238 | |
| 239 | def main(): |