janito 2.15.0__tar.gz → 2.16.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {janito-2.15.0 → janito-2.16.0}/CHANGELOG.md +103 -18
- janito-2.16.0/CHANGELOG_2.16.0.md +81 -0
- {janito-2.15.0 → janito-2.16.0}/PKG-INFO +1 -1
- janito-2.16.0/docs/supported-providers-models.md +47 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/session.py +42 -1
- janito-2.16.0/janito/cli/cli_commands/list_drivers.py +161 -0
- janito-2.16.0/janito/cli/cli_commands/list_providers_region.py +85 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/core/getters.py +7 -3
- {janito-2.15.0 → janito-2.16.0}/janito/cli/main_cli.py +38 -3
- {janito-2.15.0 → janito-2.16.0}/janito/cli/single_shot_mode/handler.py +43 -1
- {janito-2.15.0 → janito-2.16.0}/janito/drivers/azure_openai/driver.py +14 -5
- {janito-2.15.0 → janito-2.16.0}/janito/drivers/openai/driver.py +16 -5
- {janito-2.15.0 → janito-2.16.0}/janito/drivers/zai/driver.py +19 -22
- {janito-2.15.0 → janito-2.16.0}/janito/formatting_token.py +9 -5
- janito-2.16.0/janito/llm/auth_utils.py +21 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/alibaba/provider.py +13 -9
- {janito-2.15.0 → janito-2.16.0}/janito/providers/anthropic/provider.py +4 -5
- {janito-2.15.0 → janito-2.16.0}/janito/providers/azure_openai/provider.py +4 -5
- {janito-2.15.0 → janito-2.16.0}/janito/providers/deepseek/provider.py +4 -5
- {janito-2.15.0 → janito-2.16.0}/janito/providers/google/provider.py +4 -5
- janito-2.16.0/janito/providers/moonshotai/provider.py +104 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/openai/provider.py +45 -39
- {janito-2.15.0 → janito-2.16.0}/janito/providers/zai/provider.py +3 -9
- janito-2.16.0/janito/regions/__init__.py +16 -0
- janito-2.16.0/janito/regions/cli.py +124 -0
- janito-2.16.0/janito/regions/geo_utils.py +240 -0
- janito-2.16.0/janito/regions/provider_regions.py +158 -0
- {janito-2.15.0 → janito-2.16.0}/janito.egg-info/PKG-INFO +1 -1
- {janito-2.15.0 → janito-2.16.0}/janito.egg-info/SOURCES.txt +8 -1
- janito-2.15.0/docs/supported-providers-models.md +0 -95
- janito-2.15.0/janito/cli/cli_commands/list_drivers.py +0 -137
- janito-2.15.0/janito/providers/moonshotai/provider.py +0 -95
- {janito-2.15.0 → janito-2.16.0}/.codespellrc +0 -0
- {janito-2.15.0 → janito-2.16.0}/.gitattributes +0 -0
- /janito-2.15.0/.github/workflows/python-app.yml → /janito-2.16.0/.github/workflows/python-app.yml.disabled +0 -0
- {janito-2.15.0 → janito-2.16.0}/.gitignore +0 -0
- {janito-2.15.0 → janito-2.16.0}/.pre-commit-config.yaml +0 -0
- {janito-2.15.0 → janito-2.16.0}/.secrets.baseline +0 -0
- {janito-2.15.0 → janito-2.16.0}/.vscode/settings.json +0 -0
- {janito-2.15.0 → janito-2.16.0}/LICENSE +0 -0
- {janito-2.15.0 → janito-2.16.0}/README-dev.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/README.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/UPDATING_DOCS.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/adding_mcp.txt +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/DIV.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/Interfaces.txt +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/TOOLBAR-STYLING.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/about/costs.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/about/vs-webchats.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/about/why.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/alternatives.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/code_intelligence/agentic-frameworks-comparison.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/code_intelligence/code-generation-challenges.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/code_intelligence/code-generation-observability.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/code_intelligence/our-approach.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/code_intelligence/why-string-replacement.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/concepts/analysis-style.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/concepts/human-guided-ai.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/concepts/index.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/concepts/language-model-clients.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/concepts/prompt-design-style.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/deepseek-setup.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/driver-flow.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/driver-request-cancellation.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/drivers/events.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/drivers.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/event-bus.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/guides/configuration.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/guides/developing.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/guides/disabled-tools.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/guides/installation.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/guides/profiles.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/guides/prompting/README.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/guides/single-shot-terminal.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/guides/terminal-shell.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/guides/tools-developer-guide.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/guides/using.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/guides/using_tools.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/imgs/code-generation-observability.png +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/imgs/code_generation_observability.png +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/imgs/happy-programmer.png +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/imgs/happy-programmer.svg +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/imgs/terminal-one-shot.png +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/imgs/terminal-shell.png +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/imgs/terminal_one_shot.png +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/imgs/terminal_shell.png +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/index.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/llm-drivers-required-config.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/llm-drivers.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/meta/developer-toolchain.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/meta/quality-checks.txt +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/moonshotai-setup.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/reference/api.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/reference/azure-openai.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/reference/cli-options.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/reference/message-handler-model.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/reference/rich-message-handler.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/security.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/tools/search-text.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/tools-index.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/tools-natural-results.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/tools-precision.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/docs/z-ai-setup.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/git_diff.txt +0 -0
- {janito-2.15.0 → janito-2.16.0}/github_diff +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/README.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/__main__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/_version.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/agent/setup_agent.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/agent/templates/profiles/system_prompt_template_Developer_with_Python_Tools.txt.j2 +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/agent/templates/profiles/system_prompt_template_developer.txt.j2 +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/agent/templates/profiles/system_prompt_template_model_conversation_without_tools_or_context.txt.j2 +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/bindings.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/chat_entry.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/prompt_style.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/script_runner.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/session_profile_select.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/autocomplete.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/_priv_check.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/_priv_status.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/bang.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/base.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/clear.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/conversation_restart.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/execute.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/help.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/history_view.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/lang.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/model.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/multi.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/privileges.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/prompt.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/read.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/role.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/session.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/session_control.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/tools.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/utility.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/verbose.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands/write.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/commands.bak.zip +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/input_history.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/session/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/session/history.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/session/manager.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/shell/session.bak.zip +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/chat_mode/toolbar.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/cli_commands/list_config.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/cli_commands/list_models.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/cli_commands/list_profiles.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/cli_commands/list_providers.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/cli_commands/list_tools.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/cli_commands/model_selection.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/cli_commands/model_utils.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/cli_commands/set_api_key.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/cli_commands/show_config.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/cli_commands/show_system_prompt.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/config.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/console.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/core/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/core/event_logger.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/core/model_guesser.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/core/runner.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/core/setters.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/core/unsetters.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/main.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/prompt_core.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/prompt_handler.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/prompt_setup.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/rich_terminal_reporter.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/single_shot_mode/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/utils.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/cli/verbose_output.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/config.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/config_manager.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/conversation_history.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/dir_walk_utils.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/docs/GETTING_STARTED.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/driver_events.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/drivers/dashscope.bak.zip +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/drivers/openai/README.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/drivers/openai_responses.bak.zip +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/drivers/zai/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/event_bus/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/event_bus/bus.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/event_bus/event.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/event_bus/handler.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/event_bus/queue_bus.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/exceptions.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/formatting.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/gitignore_utils.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/i18n/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/i18n/messages.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/i18n/pt.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/llm/README.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/llm/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/llm/agent.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/llm/auth.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/llm/driver.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/llm/driver_config.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/llm/driver_config_builder.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/llm/driver_input.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/llm/message_parts.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/llm/model.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/llm/provider.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/mkdocs.yml +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/perf_singleton.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/performance_collector.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/platform_discovery.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/provider_config.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/provider_registry.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/alibaba/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/alibaba/model_info.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/anthropic/model_info.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/azure_openai/model_info.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/dashscope.bak.zip +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/deepseek/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/deepseek/model_info.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/google/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/google/model_info.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/moonshotai/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/moonshotai/model_info.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/openai/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/openai/model_info.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/openai/schema_generator.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/registry.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/zai/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/zai/model_info.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/providers/zai/schema_generator.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/report_events.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/shell.bak.zip +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/DOCSTRING_STANDARD.txt +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/README.md +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/adapter.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/ask_user.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/copy_file.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/create_directory.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/create_file.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/delete_text_in_file.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/fetch_url.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/find_files.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/get_file_outline/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/get_file_outline/core.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/get_file_outline/java_outline.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/get_file_outline/markdown_outline.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/get_file_outline/python_outline.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/get_file_outline/search_outline.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/move_file.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/open_html_in_browser.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/open_url.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/python_code_run.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/python_command_run.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/python_file_run.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/read_files.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/remove_directory.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/remove_file.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/replace_text_in_file.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/run_bash_command.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/run_powershell_command.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/search_text/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/search_text/core.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/search_text/match_lines.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/search_text/pattern_utils.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/search_text/traverse_directory.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/validate_file_syntax/__init__.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/validate_file_syntax/core.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/validate_file_syntax/css_validator.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/validate_file_syntax/html_validator.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/validate_file_syntax/js_validator.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/validate_file_syntax/json_validator.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/validate_file_syntax/markdown_validator.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/validate_file_syntax/ps1_validator.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/validate_file_syntax/python_validator.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/validate_file_syntax/xml_validator.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/validate_file_syntax/yaml_validator.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/adapters/local/view_file.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/disabled_tools.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/inspect_registry.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/outline_file.bak.zip +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/path_security.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/permissions.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/permissions_parse.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/tool_base.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/tool_events.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/tool_run_exception.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/tool_use_tracker.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/tool_utils.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/tools_adapter.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/tools/tools_schema.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito/utils.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito.egg-info/dependency_links.txt +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito.egg-info/entry_points.txt +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito.egg-info/requires.txt +0 -0
- {janito-2.15.0 → janito-2.16.0}/janito.egg-info/top_level.txt +0 -0
- {janito-2.15.0 → janito-2.16.0}/mkdocs.yml +0 -0
- {janito-2.15.0 → janito-2.16.0}/pyproject.toml +0 -0
- {janito-2.15.0 → janito-2.16.0}/pytest.ini +0 -0
- {janito-2.15.0 → janito-2.16.0}/requirements-dev.txt +0 -0
- {janito-2.15.0 → janito-2.16.0}/requirements.txt +0 -0
- {janito-2.15.0 → janito-2.16.0}/setup.cfg +0 -0
- {janito-2.15.0 → janito-2.16.0}/tests/adapters/local/get_file_outline/test_core_outline.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/tests/adapters/local/test_read_files.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/tests/test_cli_list_models.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/tests/test_cli_list_providers.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/tests/test_cli_list_providers_alibaba.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/tests/test_cli_list_providers_moonshotai.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/tests/test_cli_version.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/tests/test_disabled_tools.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/tests/test_provider_alibaba.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/tests/test_provider_moonshotai.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/tools/release.py +0 -0
- {janito-2.15.0 → janito-2.16.0}/tox.ini +0 -0
@@ -2,31 +2,116 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
-
## [
|
5
|
+
## [Unreleased]
|
6
|
+
|
7
|
+
## [2.16.0] - 2025-01-08
|
6
8
|
|
7
9
|
### Added
|
8
|
-
|
9
|
-
- **
|
10
|
-
-
|
11
|
-
-
|
12
|
-
-
|
13
|
-
-
|
14
|
-
|
15
|
-
- **
|
10
|
+
|
11
|
+
- **New CLI Features**
|
12
|
+
- `--python` flag: Start directly with Python developer profile without manual selection
|
13
|
+
- `--multi` option: Enable default multiline input in chat mode
|
14
|
+
- `--list-drivers` command: List available LLM drivers and their dependencies
|
15
|
+
- `--list-providers-region` command: Show providers with region information
|
16
|
+
|
17
|
+
- **New Providers**
|
18
|
+
- **Z.AI Provider**: Complete support for Z.AI with GLM-4.5, GLM-4, and GLM-4V models
|
19
|
+
- GLM-4.5: 128k context with thinking support for advanced reasoning
|
20
|
+
- GLM-4: General-purpose model with 128k context
|
21
|
+
- GLM-4V: Vision model for image understanding with 128k context
|
22
|
+
- **Alibaba Cloud Provider**: Support for Qwen models including qwen-turbo, qwen-plus, qwen-max, and qwen3-coder-plus
|
23
|
+
|
24
|
+
- **Enhanced UX**
|
25
|
+
- Model information display now includes backend hostname in both chat and single-shot modes
|
26
|
+
- Improved region management with geolocation utilities
|
27
|
+
- Enhanced error handling for missing API keys and dependencies
|
16
28
|
|
17
29
|
### Changed
|
18
|
-
|
19
|
-
- **
|
20
|
-
-
|
21
|
-
-
|
22
|
-
-
|
30
|
+
|
31
|
+
- **Provider Improvements**
|
32
|
+
- Updated Z.AI provider to use official SDK with improved model support
|
33
|
+
- Changed default GLM model from air to regular version
|
34
|
+
- Updated Alibaba endpoint to international URL for better global access
|
35
|
+
- Simplified region display to 2-letter codes for cleaner output
|
36
|
+
|
37
|
+
- **Documentation**
|
38
|
+
- Updated documentation URLs to use GitHub Pages default domain
|
39
|
+
- Fixed documentation URL to docs.janito.dev
|
40
|
+
- Enhanced provider documentation with new Z.AI and Alibaba Cloud details
|
23
41
|
|
24
42
|
### Fixed
|
25
|
-
- **Driver Configuration**: Fixed AttributeError in ZAI provider by initializing _driver_config properly
|
26
|
-
- **Import Handling**: Added proper import error handling for optional dependencies in ZAI driver
|
27
|
-
- **CLI Integration**: Fixed list_drivers integration into main CLI flow
|
28
43
|
|
29
|
-
|
44
|
+
- **Bug Fixes**
|
45
|
+
- Fixed AttributeError when ZAIProvider API key is missing
|
46
|
+
- Removed accidentally committed test files
|
47
|
+
- Improved error handling and user experience in profile selection
|
48
|
+
- Fixed various import order issues for better code organization
|
49
|
+
|
50
|
+
- **Code Quality**
|
51
|
+
- Refactored provider registry for reduced complexity
|
52
|
+
- Improved CLI argument handling and validation
|
53
|
+
- Enhanced terminal output styling and formatting
|
54
|
+
|
55
|
+
### Security
|
56
|
+
|
57
|
+
- **Enhanced Security**
|
58
|
+
- Improved privilege checking and status display in chat sessions
|
59
|
+
- Enhanced error handling for missing dependencies and API keys
|
60
|
+
- Better validation of provider configurations
|
61
|
+
|
62
|
+
### Technical Improvements
|
63
|
+
|
64
|
+
- **Architecture**
|
65
|
+
- Refactored core CLI and runner modules for better maintainability
|
66
|
+
- Improved prompt handling and streamlined main CLI logic
|
67
|
+
- Enhanced provider registry with new visual indicators
|
68
|
+
- Better separation of concerns in driver and provider implementations
|
69
|
+
|
70
|
+
- **Performance**
|
71
|
+
- Optimized model information retrieval
|
72
|
+
- Improved startup performance with better configuration handling
|
73
|
+
- Enhanced memory usage in chat sessions
|
74
|
+
|
75
|
+
### Developer Experience
|
76
|
+
|
77
|
+
- **Testing**
|
78
|
+
- Added comprehensive tests for new CLI commands
|
79
|
+
- Improved test coverage for provider configurations
|
80
|
+
- Enhanced error handling in test scenarios
|
81
|
+
|
82
|
+
- **Documentation**
|
83
|
+
- Updated all provider documentation with new features
|
84
|
+
- Added comprehensive setup guides for new providers
|
85
|
+
- Improved CLI usage examples and syntax highlighting
|
86
|
+
|
87
|
+
## [2.15.0] - 2025-08-05
|
88
|
+
|
89
|
+
## [2.16.0] - 2025-01-08
|
90
|
+
|
91
|
+
### Added
|
92
|
+
|
93
|
+
- Added `--python` CLI flag to start with the Python developer profile without manual profile selection
|
94
|
+
- Added `--list-drivers` CLI command to list available LLM drivers and their dependencies
|
95
|
+
- Added `--multi` CLI option for default multiline input in chat mode
|
96
|
+
- Enhanced model information display with backend hostname in both chat and single-shot modes
|
97
|
+
|
98
|
+
### Changed
|
99
|
+
|
100
|
+
- Updated Z.AI provider to use official SDK with improved model support
|
101
|
+
- Changed default GLM model from air to regular version
|
102
|
+
- Updated documentation URLs to use GitHub Pages default domain
|
103
|
+
|
104
|
+
### Fixed
|
105
|
+
|
106
|
+
- Fixed AttributeError when ZAIProvider API key is missing
|
107
|
+
- Removed accidentally committed test files
|
108
|
+
- Improved error handling and user experience in profile selection
|
109
|
+
|
110
|
+
### Security
|
111
|
+
|
112
|
+
- Enhanced privilege checking and status display in chat sessions
|
113
|
+
|
114
|
+
## [2.15.0] - 2025-08-05
|
30
115
|
|
31
116
|
### Added
|
32
117
|
|
@@ -0,0 +1,81 @@
|
|
1
|
+
# Changelog v2.16.0
|
2
|
+
|
3
|
+
## [2.16.0] - 2025-01-08
|
4
|
+
|
5
|
+
### Added
|
6
|
+
|
7
|
+
- **New CLI Features**
|
8
|
+
- `--python` flag: Start directly with Python developer profile without manual selection
|
9
|
+
- `--multi` option: Enable default multiline input in chat mode
|
10
|
+
- `--list-drivers` command: List available LLM drivers and their dependencies
|
11
|
+
- `--list-providers-region` command: Show providers with region information
|
12
|
+
|
13
|
+
- **New Providers**
|
14
|
+
- **Z.AI Provider**: Complete support for Z.AI with GLM-4.5, GLM-4, and GLM-4V models
|
15
|
+
- GLM-4.5: 128k context with thinking support for advanced reasoning
|
16
|
+
- GLM-4: General-purpose model with 128k context
|
17
|
+
- GLM-4V: Vision model for image understanding with 128k context
|
18
|
+
- **Alibaba Cloud Provider**: Support for Qwen models including qwen-turbo, qwen-plus, qwen-max, and qwen3-coder-plus
|
19
|
+
|
20
|
+
- **Enhanced UX**
|
21
|
+
- Model information display now includes backend hostname in both chat and single-shot modes
|
22
|
+
- Improved region management with geolocation utilities
|
23
|
+
- Enhanced error handling for missing API keys and dependencies
|
24
|
+
|
25
|
+
### Changed
|
26
|
+
|
27
|
+
- **Provider Improvements**
|
28
|
+
- Updated Z.AI provider to use official SDK with improved model support
|
29
|
+
- Changed default GLM model from air to regular version
|
30
|
+
- Updated Alibaba endpoint to international URL for better global access
|
31
|
+
- Simplified region display to 2-letter codes for cleaner output
|
32
|
+
|
33
|
+
- **Documentation**
|
34
|
+
- Updated documentation URLs to use GitHub Pages default domain
|
35
|
+
- Fixed documentation URL to docs.janito.dev
|
36
|
+
- Enhanced provider documentation with new Z.AI and Alibaba Cloud details
|
37
|
+
|
38
|
+
### Fixed
|
39
|
+
|
40
|
+
- **Bug Fixes**
|
41
|
+
- Fixed AttributeError when ZAIProvider API key is missing
|
42
|
+
- Removed accidentally committed test files
|
43
|
+
- Improved error handling and user experience in profile selection
|
44
|
+
- Fixed various import order issues for better code organization
|
45
|
+
|
46
|
+
- **Code Quality**
|
47
|
+
- Refactored provider registry for reduced complexity
|
48
|
+
- Improved CLI argument handling and validation
|
49
|
+
- Enhanced terminal output styling and formatting
|
50
|
+
|
51
|
+
### Security
|
52
|
+
|
53
|
+
- **Enhanced Security**
|
54
|
+
- Improved privilege checking and status display in chat sessions
|
55
|
+
- Enhanced error handling for missing dependencies and API keys
|
56
|
+
- Better validation of provider configurations
|
57
|
+
|
58
|
+
### Technical Improvements
|
59
|
+
|
60
|
+
- **Architecture**
|
61
|
+
- Refactored core CLI and runner modules for better maintainability
|
62
|
+
- Improved prompt handling and streamlined main CLI logic
|
63
|
+
- Enhanced provider registry with new visual indicators
|
64
|
+
- Better separation of concerns in driver and provider implementations
|
65
|
+
|
66
|
+
- **Performance**
|
67
|
+
- Optimized model information retrieval
|
68
|
+
- Improved startup performance with better configuration handling
|
69
|
+
- Enhanced memory usage in chat sessions
|
70
|
+
|
71
|
+
### Developer Experience
|
72
|
+
|
73
|
+
- **Testing**
|
74
|
+
- Added comprehensive tests for new CLI commands
|
75
|
+
- Improved test coverage for provider configurations
|
76
|
+
- Enhanced error handling in test scenarios
|
77
|
+
|
78
|
+
- **Documentation**
|
79
|
+
- Updated all provider documentation with new features
|
80
|
+
- Added comprehensive setup guides for new providers
|
81
|
+
- Improved CLI usage examples and syntax highlighting
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# Supported Providers and Models
|
2
|
+
|
3
|
+
This page lists the supported providers and their available models.
|
4
|
+
|
5
|
+
## OpenAI
|
6
|
+
|
7
|
+
- GPT-3.5 Turbo
|
8
|
+
- GPT-4
|
9
|
+
- GPT-4 Turbo
|
10
|
+
|
11
|
+
## Google
|
12
|
+
|
13
|
+
- Gemini Pro
|
14
|
+
- Gemini 1.5 Pro
|
15
|
+
|
16
|
+
## Anthropic
|
17
|
+
|
18
|
+
- Claude 2
|
19
|
+
- Claude 3 Opus
|
20
|
+
- Claude 3 Sonnet
|
21
|
+
- Claude 3 Haiku
|
22
|
+
|
23
|
+
## MoonshotAI
|
24
|
+
|
25
|
+
- kimi-k2-turbo-preview
|
26
|
+
- kimi-k2-turbo-preview
|
27
|
+
- kimi-k1-8k
|
28
|
+
- kimi-k1-32k
|
29
|
+
- kimi-k1-128k
|
30
|
+
|
31
|
+
- Llama-3-8b-8192
|
32
|
+
- Llama-3-70b-8192
|
33
|
+
|
34
|
+
## Alibaba
|
35
|
+
|
36
|
+
- qwen-turbo
|
37
|
+
- qwen-plus
|
38
|
+
- qwen-max
|
39
|
+
- qwen3-coder-plus
|
40
|
+
- qwen3-coder-480b-a35b-instruct
|
41
|
+
|
42
|
+
## Z.AI
|
43
|
+
|
44
|
+
- glm-4.5
|
45
|
+
- glm-4.5-air
|
46
|
+
|
47
|
+
<!-- Removed links to model_info.py files for all providers to avoid broken references. -->
|
@@ -115,9 +115,15 @@ class ChatSession:
|
|
115
115
|
def _select_profile_and_role(self, args, role):
|
116
116
|
profile = getattr(args, "profile", None) if args is not None else None
|
117
117
|
role_arg = getattr(args, "role", None) if args is not None else None
|
118
|
+
python_profile = getattr(args, "python", False) if args is not None else False
|
118
119
|
profile_system_prompt = None
|
119
120
|
no_tools_mode = False
|
120
|
-
|
121
|
+
|
122
|
+
# Handle --python flag
|
123
|
+
if python_profile and profile is None and role_arg is None:
|
124
|
+
profile = "Developer with Python Tools"
|
125
|
+
|
126
|
+
if profile is None and role_arg is None and not python_profile:
|
121
127
|
try:
|
122
128
|
from janito.cli.chat_mode.session_profile_select import select_profile
|
123
129
|
|
@@ -277,6 +283,41 @@ class ChatSession:
|
|
277
283
|
else None
|
278
284
|
)
|
279
285
|
start_time = time.time()
|
286
|
+
|
287
|
+
# Print rule line with model info before processing prompt
|
288
|
+
model_name = (
|
289
|
+
self.agent.get_model_name()
|
290
|
+
if hasattr(self.agent, "get_model_name")
|
291
|
+
else "Unknown"
|
292
|
+
)
|
293
|
+
provider_name = (
|
294
|
+
self.agent.get_provider_name()
|
295
|
+
if hasattr(self.agent, "get_provider_name")
|
296
|
+
else "Unknown"
|
297
|
+
)
|
298
|
+
|
299
|
+
# Get backend hostname if available
|
300
|
+
backend_hostname = "Unknown"
|
301
|
+
if hasattr(self.agent, "driver") and self.agent.driver:
|
302
|
+
if hasattr(self.agent.driver, "config") and hasattr(
|
303
|
+
self.agent.driver.config, "base_url"
|
304
|
+
):
|
305
|
+
base_url = self.agent.driver.config.base_url
|
306
|
+
if base_url:
|
307
|
+
try:
|
308
|
+
from urllib.parse import urlparse
|
309
|
+
|
310
|
+
parsed = urlparse(base_url)
|
311
|
+
backend_hostname = parsed.netloc
|
312
|
+
except Exception:
|
313
|
+
backend_hostname = base_url
|
314
|
+
|
315
|
+
self.console.print(
|
316
|
+
Rule(
|
317
|
+
f"[bold blue]Model: {model_name} ({provider_name}) | Backend: {backend_hostname}[/bold blue]"
|
318
|
+
)
|
319
|
+
)
|
320
|
+
|
280
321
|
self._prompt_handler.run_prompt(cmd_input)
|
281
322
|
end_time = time.time()
|
282
323
|
elapsed = end_time - start_time
|
@@ -0,0 +1,161 @@
|
|
1
|
+
"""
|
2
|
+
CLI Command: List available LLM drivers and their dependencies
|
3
|
+
"""
|
4
|
+
|
5
|
+
import importlib
|
6
|
+
import sys
|
7
|
+
from pathlib import Path
|
8
|
+
from rich.console import Console
|
9
|
+
from rich.table import Table
|
10
|
+
from rich.panel import Panel
|
11
|
+
from rich.text import Text
|
12
|
+
|
13
|
+
console = Console()
|
14
|
+
|
15
|
+
|
16
|
+
def _detect_dependencies_from_content(content, class_name):
|
17
|
+
"""Detect dependencies from module content."""
|
18
|
+
dependencies = []
|
19
|
+
|
20
|
+
if "import openai" in content or "from openai" in content:
|
21
|
+
dependencies.append("openai")
|
22
|
+
if "import zai" in content or "from zai" in content:
|
23
|
+
dependencies.append("zai")
|
24
|
+
if "import anthropic" in content or "from anthropic" in content:
|
25
|
+
dependencies.append("anthropic")
|
26
|
+
if "import google" in content or "from google" in content:
|
27
|
+
dependencies.append("google-generativeai")
|
28
|
+
|
29
|
+
# Remove openai from zai driver dependencies
|
30
|
+
if "ZAIModelDriver" in class_name and "openai" in dependencies:
|
31
|
+
dependencies.remove("openai")
|
32
|
+
|
33
|
+
return dependencies
|
34
|
+
|
35
|
+
|
36
|
+
def _check_dependency_status(dependencies):
|
37
|
+
"""Check if dependencies are available."""
|
38
|
+
if not dependencies:
|
39
|
+
return ["No external dependencies"]
|
40
|
+
|
41
|
+
dep_status = []
|
42
|
+
for dep in dependencies:
|
43
|
+
try:
|
44
|
+
importlib.import_module(dep)
|
45
|
+
dep_status.append(f"✅ {dep}")
|
46
|
+
except ImportError:
|
47
|
+
dep_status.append(f"❌ {dep}")
|
48
|
+
|
49
|
+
return dep_status
|
50
|
+
|
51
|
+
|
52
|
+
def _get_single_driver_info(module_path, class_name):
|
53
|
+
"""Get information for a single driver."""
|
54
|
+
try:
|
55
|
+
module = importlib.import_module(module_path)
|
56
|
+
driver_class = getattr(module, class_name)
|
57
|
+
|
58
|
+
available = getattr(driver_class, "available", True)
|
59
|
+
unavailable_reason = getattr(driver_class, "unavailable_reason", None)
|
60
|
+
|
61
|
+
# Read module file to detect imports
|
62
|
+
module_file = Path(module.__file__)
|
63
|
+
with open(module_file, "r", encoding="utf-8") as f:
|
64
|
+
content = f.read()
|
65
|
+
|
66
|
+
dependencies = _detect_dependencies_from_content(content, class_name)
|
67
|
+
dep_status = _check_dependency_status(dependencies)
|
68
|
+
|
69
|
+
return {
|
70
|
+
"name": class_name,
|
71
|
+
"available": available,
|
72
|
+
"reason": unavailable_reason,
|
73
|
+
"dependencies": dep_status,
|
74
|
+
}
|
75
|
+
|
76
|
+
except (ImportError, AttributeError) as e:
|
77
|
+
return {
|
78
|
+
"name": class_name,
|
79
|
+
"module": module_path,
|
80
|
+
"available": False,
|
81
|
+
"reason": str(e),
|
82
|
+
"dependencies": ["❌ Module not found"],
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
def get_driver_info():
|
87
|
+
"""Get information about all available drivers."""
|
88
|
+
drivers = []
|
89
|
+
|
90
|
+
# Define known driver modules
|
91
|
+
driver_modules = [
|
92
|
+
("janito.drivers.openai.driver", "OpenAIModelDriver"),
|
93
|
+
("janito.drivers.azure_openai.driver", "AzureOpenAIModelDriver"),
|
94
|
+
("janito.drivers.zai.driver", "ZAIModelDriver"),
|
95
|
+
]
|
96
|
+
|
97
|
+
for module_path, class_name in driver_modules:
|
98
|
+
driver_info = _get_single_driver_info(module_path, class_name)
|
99
|
+
drivers.append(driver_info)
|
100
|
+
|
101
|
+
return drivers
|
102
|
+
|
103
|
+
|
104
|
+
def _create_driver_table(drivers):
|
105
|
+
"""Create and populate the drivers table."""
|
106
|
+
table = Table(title="Available LLM Drivers")
|
107
|
+
table.add_column("Driver", style="cyan", no_wrap=True)
|
108
|
+
table.add_column("Status", style="bold")
|
109
|
+
table.add_column("Dependencies", style="yellow")
|
110
|
+
|
111
|
+
for driver in drivers:
|
112
|
+
name = driver["name"]
|
113
|
+
|
114
|
+
if driver["available"]:
|
115
|
+
status = "[green]✅ Available[/green]"
|
116
|
+
if driver["reason"]:
|
117
|
+
status = f"[yellow]⚠️ Available ({driver['reason']})[/yellow]"
|
118
|
+
else:
|
119
|
+
status = f"[red]❌ Unavailable[/red]"
|
120
|
+
if driver["reason"]:
|
121
|
+
status = f"[red]❌ {driver['reason']}[/red]"
|
122
|
+
|
123
|
+
deps = "\n".join(driver["dependencies"])
|
124
|
+
table.add_row(name, status, deps)
|
125
|
+
|
126
|
+
return table
|
127
|
+
|
128
|
+
|
129
|
+
def _get_missing_dependencies(drivers):
|
130
|
+
"""Get list of missing dependencies."""
|
131
|
+
missing_deps = []
|
132
|
+
for driver in drivers:
|
133
|
+
for dep_status in driver["dependencies"]:
|
134
|
+
if dep_status.startswith("❌"):
|
135
|
+
dep_name = dep_status.split()[1]
|
136
|
+
if dep_name not in missing_deps:
|
137
|
+
missing_deps.append(dep_name)
|
138
|
+
return missing_deps
|
139
|
+
|
140
|
+
|
141
|
+
def handle_list_drivers(args=None):
|
142
|
+
"""List all available LLM drivers with their status and dependencies."""
|
143
|
+
drivers = get_driver_info()
|
144
|
+
|
145
|
+
if not drivers:
|
146
|
+
console.print("[red]No drivers found[/red]")
|
147
|
+
return
|
148
|
+
|
149
|
+
table = _create_driver_table(drivers)
|
150
|
+
console.print(table)
|
151
|
+
|
152
|
+
# Installation help - only show for missing dependencies
|
153
|
+
missing_deps = _get_missing_dependencies(drivers)
|
154
|
+
if missing_deps:
|
155
|
+
console.print(
|
156
|
+
f"\n[dim]💡 Install missing deps: pip install {' '.join(missing_deps)}[/dim]"
|
157
|
+
)
|
158
|
+
|
159
|
+
|
160
|
+
if __name__ == "__main__":
|
161
|
+
handle_list_drivers()
|
@@ -0,0 +1,85 @@
|
|
1
|
+
"""
|
2
|
+
CLI Command: List providers with their regional API information
|
3
|
+
"""
|
4
|
+
|
5
|
+
import json
|
6
|
+
from typing import Dict, List
|
7
|
+
from rich.console import Console
|
8
|
+
from rich.table import Table
|
9
|
+
from rich.panel import Panel
|
10
|
+
|
11
|
+
from janito.regions.provider_regions import PROVIDER_REGIONS, get_all_providers
|
12
|
+
from janito.regions.geo_utils import get_region_info
|
13
|
+
|
14
|
+
console = Console()
|
15
|
+
|
16
|
+
|
17
|
+
def handle_list_providers_region(args=None):
|
18
|
+
"""List all providers with their regional API information."""
|
19
|
+
|
20
|
+
# Get user location info
|
21
|
+
user_info = get_region_info()
|
22
|
+
user_region = user_info["major_region"]
|
23
|
+
|
24
|
+
# Get all providers
|
25
|
+
providers = get_all_providers()
|
26
|
+
|
27
|
+
# Create table
|
28
|
+
table = Table(title="LLM Providers by Region")
|
29
|
+
table.add_column("Provider", style="cyan", no_wrap=True)
|
30
|
+
table.add_column("Region", style="green")
|
31
|
+
table.add_column("Endpoint", style="bright_white")
|
32
|
+
|
33
|
+
for provider in sorted(providers):
|
34
|
+
regions = PROVIDER_REGIONS.get(provider, [])
|
35
|
+
if not regions:
|
36
|
+
table.add_row(provider, "N/A", "N/A", "N/A", "N/A")
|
37
|
+
continue
|
38
|
+
|
39
|
+
# Find the best region for the user
|
40
|
+
best_region = None
|
41
|
+
for region in regions:
|
42
|
+
if region.region_code.startswith(user_region):
|
43
|
+
best_region = region
|
44
|
+
break
|
45
|
+
|
46
|
+
# If no exact match, use first available
|
47
|
+
if not best_region:
|
48
|
+
best_region = regions[0]
|
49
|
+
|
50
|
+
# Extract 2-letter region code
|
51
|
+
if provider == "azure-openai":
|
52
|
+
region_code = "ALL"
|
53
|
+
else:
|
54
|
+
region_code = (
|
55
|
+
user_region
|
56
|
+
if any(r.region_code.startswith(user_region) for r in regions)
|
57
|
+
else (
|
58
|
+
"APAC"
|
59
|
+
if best_region.region_code == "ASIA-PACIFIC"
|
60
|
+
else best_region.region_code[:2]
|
61
|
+
)
|
62
|
+
)
|
63
|
+
|
64
|
+
table.add_row(
|
65
|
+
provider,
|
66
|
+
region_code,
|
67
|
+
best_region.endpoint,
|
68
|
+
)
|
69
|
+
|
70
|
+
console.print(table)
|
71
|
+
|
72
|
+
# Show user location info
|
73
|
+
console.print(
|
74
|
+
f"\n[dim]Your location: {user_info['country_code']} ({user_region})[/dim]"
|
75
|
+
)
|
76
|
+
console.print(f"[dim]Detection source: {user_info['source']}[/dim]")
|
77
|
+
|
78
|
+
# Show region mapping info
|
79
|
+
console.print(
|
80
|
+
"\n[dim]Regions: US (United States), EU (Europe), CN (China), CH (Switzerland), APAC (Asia Pacific)[/dim]"
|
81
|
+
)
|
82
|
+
|
83
|
+
|
84
|
+
if __name__ == "__main__":
|
85
|
+
handle_list_providers_region()
|
@@ -8,6 +8,8 @@ from janito.cli.cli_commands.list_tools import handle_list_tools
|
|
8
8
|
from janito.cli.cli_commands.show_config import handle_show_config
|
9
9
|
from janito.cli.cli_commands.list_config import handle_list_config
|
10
10
|
from janito.cli.cli_commands.list_drivers import handle_list_drivers
|
11
|
+
from janito.regions.cli import handle_region_info
|
12
|
+
from janito.cli.cli_commands.list_providers_region import handle_list_providers_region
|
11
13
|
from functools import partial
|
12
14
|
from janito.provider_registry import ProviderRegistry
|
13
15
|
|
@@ -19,6 +21,8 @@ GETTER_KEYS = [
|
|
19
21
|
"list_tools",
|
20
22
|
"list_config",
|
21
23
|
"list_drivers",
|
24
|
+
"region_info",
|
25
|
+
"list_providers_region",
|
22
26
|
]
|
23
27
|
|
24
28
|
|
@@ -45,9 +49,9 @@ def handle_getter(args, config_mgr=None):
|
|
45
49
|
"show_config": partial(handle_show_config, args),
|
46
50
|
"list_config": partial(handle_list_config, args),
|
47
51
|
"list_drivers": partial(handle_list_drivers, args),
|
52
|
+
"region_info": partial(handle_region_info, args),
|
53
|
+
"list_providers_region": partial(handle_list_providers_region, args),
|
48
54
|
}
|
49
55
|
for arg in GETTER_KEYS:
|
50
56
|
if getattr(args, arg, False) and arg in GETTER_DISPATCH:
|
51
|
-
GETTER_DISPATCH[arg]()
|
52
|
-
import sys
|
53
|
-
sys.exit(0)
|
57
|
+
return GETTER_DISPATCH[arg]()
|
@@ -36,6 +36,13 @@ definition = [
|
|
36
36
|
"default": None,
|
37
37
|
},
|
38
38
|
),
|
39
|
+
(
|
40
|
+
["--python"],
|
41
|
+
{
|
42
|
+
"action": "store_true",
|
43
|
+
"help": "Start with the Python developer profile (equivalent to --profile 'Developer with Python Tools')",
|
44
|
+
},
|
45
|
+
),
|
39
46
|
(
|
40
47
|
["--role"],
|
41
48
|
{
|
@@ -119,7 +126,24 @@ definition = [
|
|
119
126
|
),
|
120
127
|
(
|
121
128
|
["--list-drivers"],
|
122
|
-
{
|
129
|
+
{
|
130
|
+
"action": "store_true",
|
131
|
+
"help": "List available LLM drivers and their dependencies",
|
132
|
+
},
|
133
|
+
),
|
134
|
+
(
|
135
|
+
["--region-info"],
|
136
|
+
{
|
137
|
+
"action": "store_true",
|
138
|
+
"help": "Show current region information and location",
|
139
|
+
},
|
140
|
+
),
|
141
|
+
(
|
142
|
+
["--list-providers-region"],
|
143
|
+
{
|
144
|
+
"action": "store_true",
|
145
|
+
"help": "List all providers with their regional API information",
|
146
|
+
},
|
123
147
|
),
|
124
148
|
(
|
125
149
|
["-l", "--list-models"],
|
@@ -192,6 +216,7 @@ MODIFIER_KEYS = [
|
|
192
216
|
"model",
|
193
217
|
"role",
|
194
218
|
"profile",
|
219
|
+
"python",
|
195
220
|
"system",
|
196
221
|
"temperature",
|
197
222
|
"verbose",
|
@@ -211,6 +236,8 @@ GETTER_KEYS = [
|
|
211
236
|
"list_tools",
|
212
237
|
"list_config",
|
213
238
|
"list_drivers",
|
239
|
+
"region_info",
|
240
|
+
"list_providers_region",
|
214
241
|
]
|
215
242
|
|
216
243
|
|
@@ -327,7 +354,14 @@ class JanitoCLI:
|
|
327
354
|
if self._run_set_mode():
|
328
355
|
return
|
329
356
|
# Special handling: provider is not required for list_providers, list_tools, show_config, list_drivers
|
330
|
-
if run_mode == RunMode.GET
|
357
|
+
if run_mode == RunMode.GET and (
|
358
|
+
self.args.list_providers
|
359
|
+
or self.args.list_tools
|
360
|
+
or self.args.list_profiles
|
361
|
+
or self.args.show_config
|
362
|
+
or self.args.list_config
|
363
|
+
or self.args.list_drivers
|
364
|
+
):
|
331
365
|
self._maybe_print_verbose_provider_model()
|
332
366
|
handle_getter(self.args)
|
333
367
|
return
|
@@ -363,7 +397,8 @@ class JanitoCLI:
|
|
363
397
|
agent_role,
|
364
398
|
verbose_tools=self.args.verbose_tools,
|
365
399
|
)
|
366
|
-
|
400
|
+
elif run_mode == RunMode.GET:
|
401
|
+
handle_getter(self.args)
|
367
402
|
|
368
403
|
def _run_set_mode(self):
|
369
404
|
if handle_api_key_set(self.args):
|