janito 2.10.0__tar.gz → 2.14.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.10.0 → janito-2.14.0}/CHANGELOG.md +44 -1
- {janito-2.10.0/janito.egg-info → janito-2.14.0}/PKG-INFO +1 -1
- {janito-2.10.0 → janito-2.14.0}/docs/guides/terminal-shell.md +1 -0
- {janito-2.10.0 → janito-2.14.0}/docs/index.md +1 -0
- {janito-2.10.0 → janito-2.14.0}/docs/reference/cli-options.md +2 -1
- janito-2.14.0/docs/supported-providers-models.md +95 -0
- janito-2.14.0/docs/z-ai-setup.md +83 -0
- {janito-2.10.0 → janito-2.14.0}/janito/agent/setup_agent.py +1 -1
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/session.py +9 -0
- janito-2.14.0/janito/cli/cli_commands/list_drivers.py +137 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/core/getters.py +6 -1
- janito-2.14.0/janito/cli/core/model_guesser.py +51 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/core/runner.py +13 -1
- {janito-2.10.0 → janito-2.14.0}/janito/cli/main_cli.py +15 -10
- {janito-2.10.0 → janito-2.14.0}/janito/drivers/openai/driver.py +3 -2
- janito-2.14.0/janito/drivers/zai/__init__.py +1 -0
- janito-2.14.0/janito/drivers/zai/driver.py +476 -0
- {janito-2.10.0 → janito-2.14.0}/janito/mkdocs.yml +1 -1
- {janito-2.10.0 → janito-2.14.0}/janito/providers/__init__.py +1 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/alibaba/model_info.py +7 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/alibaba/provider.py +1 -1
- janito-2.14.0/janito/providers/zai/__init__.py +1 -0
- janito-2.14.0/janito/providers/zai/model_info.py +38 -0
- janito-2.14.0/janito/providers/zai/provider.py +131 -0
- janito-2.14.0/janito/providers/zai/schema_generator.py +135 -0
- {janito-2.10.0 → janito-2.14.0/janito.egg-info}/PKG-INFO +1 -1
- {janito-2.10.0 → janito-2.14.0}/janito.egg-info/SOURCES.txt +11 -3
- {janito-2.10.0 → janito-2.14.0}/mkdocs.yml +2 -1
- janito-2.14.0/tests/test_cli_list_providers_alibaba.py +14 -0
- janito-2.14.0/tests/test_provider_alibaba.py +12 -0
- janito-2.10.0/CNAME +0 -1
- janito-2.10.0/docs/supported-providers-models.md +0 -36
- janito-2.10.0/janito/docs/PROVIDERS.md +0 -224
- janito-2.10.0/janito/drivers/driver_registry.py +0 -27
- {janito-2.10.0 → janito-2.14.0}/.codespellrc +0 -0
- {janito-2.10.0 → janito-2.14.0}/.gitattributes +0 -0
- {janito-2.10.0 → janito-2.14.0}/.github/workflows/python-app.yml +0 -0
- {janito-2.10.0 → janito-2.14.0}/.gitignore +0 -0
- {janito-2.10.0 → janito-2.14.0}/.pre-commit-config.yaml +0 -0
- {janito-2.10.0 → janito-2.14.0}/.secrets.baseline +0 -0
- {janito-2.10.0 → janito-2.14.0}/.vscode/settings.json +0 -0
- {janito-2.10.0 → janito-2.14.0}/LICENSE +0 -0
- {janito-2.10.0 → janito-2.14.0}/README-dev.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/README.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/UPDATING_DOCS.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/adding_mcp.txt +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/DIV.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/Interfaces.txt +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/TOOLBAR-STYLING.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/about/costs.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/about/vs-webchats.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/about/why.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/alternatives.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/code_intelligence/agentic-frameworks-comparison.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/code_intelligence/code-generation-challenges.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/code_intelligence/code-generation-observability.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/code_intelligence/our-approach.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/code_intelligence/why-string-replacement.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/concepts/analysis-style.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/concepts/human-guided-ai.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/concepts/index.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/concepts/language-model-clients.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/concepts/prompt-design-style.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/deepseek-setup.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/driver-flow.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/driver-request-cancellation.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/drivers/events.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/drivers.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/event-bus.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/guides/configuration.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/guides/developing.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/guides/disabled-tools.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/guides/installation.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/guides/profiles.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/guides/prompting/README.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/guides/single-shot-terminal.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/guides/tools-developer-guide.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/guides/using.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/guides/using_tools.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/imgs/code-generation-observability.png +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/imgs/code_generation_observability.png +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/imgs/happy-programmer.png +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/imgs/happy-programmer.svg +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/imgs/terminal-one-shot.png +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/imgs/terminal-shell.png +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/imgs/terminal_one_shot.png +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/imgs/terminal_shell.png +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/llm-drivers-required-config.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/llm-drivers.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/meta/developer-toolchain.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/meta/quality-checks.txt +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/moonshotai-setup.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/reference/api.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/reference/azure-openai.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/reference/message-handler-model.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/reference/rich-message-handler.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/security.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/tools/search-text.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/tools-index.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/tools-natural-results.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/docs/tools-precision.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/git_diff.txt +0 -0
- {janito-2.10.0 → janito-2.14.0}/github_diff +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/README.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/__main__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/_version.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/agent/templates/profiles/system_prompt_template_Developer_with_Python_Tools.txt.j2 +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/agent/templates/profiles/system_prompt_template_developer.txt.j2 +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/agent/templates/profiles/system_prompt_template_model_conversation_without_tools_or_context.txt.j2 +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/bindings.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/chat_entry.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/prompt_style.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/script_runner.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/session_profile_select.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/autocomplete.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/_priv_check.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/_priv_status.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/bang.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/base.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/clear.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/conversation_restart.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/execute.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/help.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/history_view.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/lang.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/model.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/multi.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/privileges.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/prompt.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/read.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/role.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/session.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/session_control.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/tools.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/utility.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/verbose.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands/write.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/commands.bak.zip +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/input_history.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/session/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/session/history.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/session/manager.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/shell/session.bak.zip +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/chat_mode/toolbar.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/cli_commands/list_config.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/cli_commands/list_models.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/cli_commands/list_profiles.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/cli_commands/list_providers.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/cli_commands/list_tools.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/cli_commands/model_selection.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/cli_commands/model_utils.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/cli_commands/set_api_key.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/cli_commands/show_config.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/cli_commands/show_system_prompt.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/config.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/console.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/core/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/core/event_logger.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/core/setters.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/core/unsetters.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/main.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/prompt_core.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/prompt_handler.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/prompt_setup.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/rich_terminal_reporter.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/single_shot_mode/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/single_shot_mode/handler.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/utils.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/cli/verbose_output.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/config.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/config_manager.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/conversation_history.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/dir_walk_utils.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/docs/GETTING_STARTED.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/driver_events.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/drivers/azure_openai/driver.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/drivers/dashscope.bak.zip +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/drivers/openai/README.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/drivers/openai_responses.bak.zip +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/event_bus/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/event_bus/bus.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/event_bus/event.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/event_bus/handler.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/event_bus/queue_bus.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/exceptions.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/formatting.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/formatting_token.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/gitignore_utils.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/i18n/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/i18n/messages.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/i18n/pt.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/llm/README.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/llm/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/llm/agent.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/llm/auth.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/llm/driver.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/llm/driver_config.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/llm/driver_config_builder.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/llm/driver_input.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/llm/message_parts.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/llm/model.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/llm/provider.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/perf_singleton.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/performance_collector.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/platform_discovery.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/provider_config.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/provider_registry.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/alibaba/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/anthropic/model_info.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/anthropic/provider.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/azure_openai/model_info.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/azure_openai/provider.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/dashscope.bak.zip +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/deepseek/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/deepseek/model_info.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/deepseek/provider.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/google/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/google/model_info.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/google/provider.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/moonshotai/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/moonshotai/model_info.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/moonshotai/provider.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/openai/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/openai/model_info.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/openai/provider.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/openai/schema_generator.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/providers/registry.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/report_events.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/shell.bak.zip +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/DOCSTRING_STANDARD.txt +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/README.md +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/adapter.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/ask_user.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/copy_file.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/create_directory.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/create_file.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/delete_text_in_file.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/fetch_url.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/find_files.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/get_file_outline/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/get_file_outline/core.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/get_file_outline/java_outline.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/get_file_outline/markdown_outline.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/get_file_outline/python_outline.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/get_file_outline/search_outline.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/move_file.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/open_html_in_browser.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/open_url.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/python_code_run.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/python_command_run.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/python_file_run.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/read_files.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/remove_directory.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/remove_file.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/replace_text_in_file.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/run_bash_command.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/run_powershell_command.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/search_text/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/search_text/core.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/search_text/match_lines.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/search_text/pattern_utils.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/search_text/traverse_directory.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/validate_file_syntax/__init__.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/validate_file_syntax/core.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/validate_file_syntax/css_validator.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/validate_file_syntax/html_validator.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/validate_file_syntax/js_validator.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/validate_file_syntax/json_validator.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/validate_file_syntax/markdown_validator.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/validate_file_syntax/ps1_validator.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/validate_file_syntax/python_validator.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/validate_file_syntax/xml_validator.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/validate_file_syntax/yaml_validator.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/adapters/local/view_file.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/disabled_tools.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/inspect_registry.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/outline_file.bak.zip +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/path_security.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/permissions.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/permissions_parse.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/tool_base.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/tool_events.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/tool_run_exception.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/tool_use_tracker.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/tool_utils.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/tools_adapter.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/tools/tools_schema.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito/utils.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito.egg-info/dependency_links.txt +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito.egg-info/entry_points.txt +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito.egg-info/requires.txt +0 -0
- {janito-2.10.0 → janito-2.14.0}/janito.egg-info/top_level.txt +0 -0
- {janito-2.10.0 → janito-2.14.0}/pyproject.toml +0 -0
- {janito-2.10.0 → janito-2.14.0}/pytest.ini +0 -0
- {janito-2.10.0 → janito-2.14.0}/requirements-dev.txt +0 -0
- {janito-2.10.0 → janito-2.14.0}/requirements.txt +0 -0
- {janito-2.10.0 → janito-2.14.0}/setup.cfg +0 -0
- {janito-2.10.0 → janito-2.14.0}/tests/adapters/local/get_file_outline/test_core_outline.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/tests/adapters/local/test_read_files.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/tests/test_cli_list_models.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/tests/test_cli_list_providers.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/tests/test_cli_list_providers_moonshotai.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/tests/test_cli_version.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/tests/test_disabled_tools.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/tests/test_provider_moonshotai.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/tools/release.py +0 -0
- {janito-2.10.0 → janito-2.14.0}/tox.ini +0 -0
@@ -2,7 +2,50 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
-
## [
|
5
|
+
## [2.12.0] - 2025-08-05
|
6
|
+
|
7
|
+
### Added
|
8
|
+
- **Enhanced Provider Documentation**: Updated supported-providers-models.md with comprehensive provider information including drivers and dependencies
|
9
|
+
- **Improved Driver Listing**: Enhanced list_drivers command with better dependency detection and duplicate removal
|
10
|
+
- **Z.AI Provider**: Added ZAIModelDriver with OpenAI SDK compatibility for Z.AI API
|
11
|
+
- **Google Gemini Provider**: Added support for Gemini Pro and Gemini 1.5 Pro models via OpenAI-compatible API
|
12
|
+
- **DeepSeek Provider**: Added support for deepseek-chat and deepseek-coder models via OpenAI-compatible API
|
13
|
+
- **Alibaba Provider**: Added support for qwen-turbo, qwen-plus, qwen-max, and qwen3-coder-plus models via OpenAI-compatible API
|
14
|
+
- **MoonshotAI Provider**: Enhanced with additional models and OpenAI-compatible API support
|
15
|
+
- **Azure OpenAI Provider**: Added support for GPT-4o and GPT-4o-mini models
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
- **CLI Core**: Updated getter functions to exit after execution for better CLI behavior
|
19
|
+
- **Driver Architecture**: Enhanced ZAI driver to use OpenAI SDK instead of Z.AI SDK for better compatibility
|
20
|
+
- **Dependency Management**: Improved dependency detection in list_drivers command with duplicate removal
|
21
|
+
- **Provider Registry**: Enhanced provider information display with driver names and dependency status
|
22
|
+
- **Model Support**: Updated all providers to use OpenAI-compatible API where applicable, expanding model availability
|
23
|
+
|
24
|
+
### 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
|
+
|
29
|
+
## [2.11.0] - 2025-08-04
|
30
|
+
|
31
|
+
### Added
|
32
|
+
|
33
|
+
- **Z.AI Provider**: Added complete support for Z.AI with GLM-4.5, GLM-4, and GLM-4V models
|
34
|
+
- GLM-4.5: 128k context with thinking support for advanced reasoning
|
35
|
+
- GLM-4: General-purpose model with 128k context
|
36
|
+
- GLM-4V: Vision model for image understanding with 128k context
|
37
|
+
- **Alibaba Cloud Provider**: Added support for Alibaba Cloud's Qwen models
|
38
|
+
- qwen-turbo, qwen-plus, qwen-max, and qwen3-coder-plus models
|
39
|
+
- Updated supported providers documentation to include new Z.AI and Alibaba Cloud providers
|
40
|
+
|
41
|
+
### Changed
|
42
|
+
|
43
|
+
- Enhanced provider registry with new visual indicators and improved model listing
|
44
|
+
- Updated documentation to reflect new provider additions and model availability
|
45
|
+
|
46
|
+
### Removed
|
47
|
+
|
48
|
+
- Removed deprecated PROVIDERS.md file from janito/docs (content merged into supported-providers-models.md)
|
6
49
|
|
7
50
|
## [2.9.0] - 2025-07-16
|
8
51
|
### Added
|
@@ -32,6 +32,7 @@ You can use these commands at any time (prefix with `/` or just type the name):
|
|
32
32
|
| `/lang <code>` | Change the interface language (e.g., `/lang pt`, `/lang en`) |
|
33
33
|
| `/clear` | Clear the terminal screen |
|
34
34
|
| `/multi` | Enter multiline input mode (write multi-line text, Esc+Enter) |
|
35
|
+
| `--multi` (CLI arg) | Start chat mode with multiline input as default (no need for /multi) |
|
35
36
|
| `/config` | Show or set configuration (see: `/config show`, `/config set local|global key=value`) |
|
36
37
|
| `/edit <filename>` | Open a file in the browser-based editor |
|
37
38
|
| `/view` | Print the current LLM conversation history |
|
@@ -21,5 +21,6 @@ Janito is a lightweight language model client focused on software development ac
|
|
21
21
|
- [What Is a Language Model Client?](concepts/language-model-clients.md) — Thin vs. Thick Clients explained
|
22
22
|
- [Configuring Janito for DeepSeek](deepseek-setup.md) — How to set up and use DeepSeek models
|
23
23
|
- [Configuring Janito for MoonshotAI](moonshotai-setup.md) — How to set up and use MoonshotAI models
|
24
|
+
- [Configuring Janito for Z.ai](z-ai-setup.md) — How to set up and use Z.ai models
|
24
25
|
- **Concepts & Terminology:** See the [concepts](concepts/index.md) section for more foundational explanations.
|
25
26
|
|
@@ -20,6 +20,7 @@ These options are useful for one-off runs, scripting, or experimentation. They t
|
|
20
20
|
| `--verbose-agent` | Print info messages for agent event and message part handling. |
|
21
21
|
| `-z`, `--zero` | IDE zero mode: disables system prompt & all tools for raw LLM interaction |
|
22
22
|
| `-u`, `--unrestricted-paths` | Disable path security: allow tool arguments to use any file/directory path (DANGEROUS). See [Security](../security.md) for details. |
|
23
|
+
| `--multi` | Start chat mode with multiline input as default (no need for /multi command) |
|
23
24
|
| `-r`, `--read` | Enable tools that require read permissions (default: off) |
|
24
25
|
| `-w`, `--write` | Enable tools that require write permissions (default: off) |
|
25
26
|
| `-x`, `--exec` | Enable execution/run tools (allows running code or shell tools from the CLI). (default: off) |
|
@@ -50,7 +51,7 @@ janito [options] [prompt]
|
|
50
51
|
janito -p openai -m gpt-3.5-turbo "Your prompt here"
|
51
52
|
janito -c myproject -p openai "Prompt for my project (uses ~/.janito/configs/myproject.json)"
|
52
53
|
janito --list-tools
|
53
|
-
janito --
|
54
|
+
janito --multi # Start chat mode with multiline input as default
|
54
55
|
janito -u -x --read --write "Run a tool with unrestricted paths (DANGEROUS)"
|
55
56
|
```
|
56
57
|
|
@@ -0,0 +1,95 @@
|
|
1
|
+
# Supported Providers and Models
|
2
|
+
|
3
|
+
This page lists the supported providers and their available models.
|
4
|
+
|
5
|
+
## OpenAI
|
6
|
+
|
7
|
+
- **Driver**: OpenAIModelDriver
|
8
|
+
- **Dependencies**: ✅ openai
|
9
|
+
|
10
|
+
**Models:**
|
11
|
+
|
12
|
+
- GPT-3.5 Turbo
|
13
|
+
- GPT-4
|
14
|
+
- GPT-4 Turbo
|
15
|
+
- GPT-4o
|
16
|
+
- GPT-4o-mini
|
17
|
+
|
18
|
+
## Azure OpenAI
|
19
|
+
|
20
|
+
- **Driver**: AzureOpenAIModelDriver
|
21
|
+
- **Dependencies**: ✅ openai
|
22
|
+
|
23
|
+
**Models:**
|
24
|
+
|
25
|
+
- GPT-4o
|
26
|
+
- GPT-4o-mini
|
27
|
+
- GPT-4 Turbo
|
28
|
+
|
29
|
+
## Anthropic
|
30
|
+
|
31
|
+
- **Driver**: OpenAIModelDriver (via OpenAI-compatible API)
|
32
|
+
- **Dependencies**: ✅ openai
|
33
|
+
|
34
|
+
**Models:**
|
35
|
+
|
36
|
+
- Claude 3.7 Sonnet (claude-3-7-sonnet-20250219)
|
37
|
+
- Claude 3.5 Sonnet (claude-3-5-sonnet-20241022)
|
38
|
+
- Claude 3.5 Haiku (claude-3-5-haiku-20241022)
|
39
|
+
- Claude 3 Opus (claude-3-opus-20240229)
|
40
|
+
- Claude 3 Haiku (claude-3-haiku-20240307)
|
41
|
+
|
42
|
+
## Z.AI
|
43
|
+
|
44
|
+
- **Driver**: ZAIModelDriver
|
45
|
+
- **Dependencies**: ❌ zai (install with `pip install zai`)
|
46
|
+
|
47
|
+
**Models:**
|
48
|
+
|
49
|
+
- glm-4.5
|
50
|
+
- glm-4.5-air
|
51
|
+
|
52
|
+
## MoonshotAI
|
53
|
+
|
54
|
+
- **Driver**: OpenAIModelDriver (via OpenAI-compatible API)
|
55
|
+
- **Dependencies**: ✅ openai
|
56
|
+
|
57
|
+
**Models:**
|
58
|
+
|
59
|
+
- kimi-k2-turbo-preview
|
60
|
+
- kimi-k1-8k
|
61
|
+
- kimi-k1-32k
|
62
|
+
- kimi-k1-128k
|
63
|
+
|
64
|
+
## Alibaba
|
65
|
+
|
66
|
+
- **Driver**: OpenAIModelDriver (via OpenAI-compatible API)
|
67
|
+
- **Dependencies**: ✅ openai
|
68
|
+
|
69
|
+
**Models:**
|
70
|
+
|
71
|
+
- qwen-turbo
|
72
|
+
- qwen-plus
|
73
|
+
- qwen-max
|
74
|
+
- qwen3-coder-plus
|
75
|
+
- qwen3-coder-480b-a35b-instruct
|
76
|
+
|
77
|
+
## Google Gemini
|
78
|
+
|
79
|
+
- **Driver**: OpenAIModelDriver (via OpenAI-compatible API)
|
80
|
+
- **Dependencies**: ✅ openai
|
81
|
+
|
82
|
+
**Models:**
|
83
|
+
|
84
|
+
- Gemini Pro
|
85
|
+
- Gemini 1.5 Pro
|
86
|
+
|
87
|
+
## DeepSeek
|
88
|
+
|
89
|
+
- **Driver**: OpenAIModelDriver (via OpenAI-compatible API)
|
90
|
+
- **Dependencies**: ✅ openai
|
91
|
+
|
92
|
+
**Models:**
|
93
|
+
|
94
|
+
- deepseek-chat
|
95
|
+
- deepseek-coder
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# Z.ai API Setup Guide
|
2
|
+
|
3
|
+
This guide explains how to set up and use Z.ai's API with your API key.
|
4
|
+
|
5
|
+
## Getting Your API Key
|
6
|
+
|
7
|
+
1. Visit [Z.ai API Management](https://z.ai/manage-apikey/apikey-list)
|
8
|
+
2. Log in to your Z.ai account
|
9
|
+
3. Navigate to the API Keys section
|
10
|
+
4. Create a new API key if you don't have one yet
|
11
|
+
|
12
|
+
## API Key Format
|
13
|
+
|
14
|
+
Z.ai uses a new key format that includes both a user ID and secret:
|
15
|
+
```
|
16
|
+
{id}.{secret}
|
17
|
+
```
|
18
|
+
|
19
|
+
**Important Security Notes:**
|
20
|
+
|
21
|
+
- Never share your API keys
|
22
|
+
- Do not expose keys in browsers or client-side code
|
23
|
+
- Leaked keys may be automatically regenerated for security
|
24
|
+
- Store keys securely in environment variables or secure vaults
|
25
|
+
|
26
|
+
## Setting Up Your Environment
|
27
|
+
|
28
|
+
### Environment Variable (Recommended)
|
29
|
+
|
30
|
+
Set your API key as an environment variable:
|
31
|
+
|
32
|
+
**Linux/macOS:**
|
33
|
+
```bash
|
34
|
+
export ZAI_API_KEY="your-id.your-secret"
|
35
|
+
```
|
36
|
+
|
37
|
+
**Windows (Command Prompt):**
|
38
|
+
```cmd
|
39
|
+
set ZAI_API_KEY=your-id.your-secret
|
40
|
+
```
|
41
|
+
|
42
|
+
**Windows (PowerShell):**
|
43
|
+
```powershell
|
44
|
+
$env:ZAI_API_KEY="your-id.your-secret"
|
45
|
+
```
|
46
|
+
|
47
|
+
### Configuration File
|
48
|
+
|
49
|
+
You can also store your API key in a configuration file (ensure proper file permissions):
|
50
|
+
|
51
|
+
```json
|
52
|
+
{
|
53
|
+
"zai_api_key": "your-id.your-secret"
|
54
|
+
}
|
55
|
+
```
|
56
|
+
|
57
|
+
## Rate Limits and Billing
|
58
|
+
|
59
|
+
- Check your [API Management dashboard](https://z.ai/manage-apikey/apikey-list) for current rate limits
|
60
|
+
- Monitor your usage and billing information
|
61
|
+
- Contact support for API recharge if needed
|
62
|
+
|
63
|
+
## Support
|
64
|
+
|
65
|
+
For API-related support:
|
66
|
+
|
67
|
+
- Visit [Z.ai Contact](https://z.ai/contact) for product support
|
68
|
+
- Join the [Discord community](https://z.ai/contact) to chat with developers
|
69
|
+
- Check the [API documentation](https://z.ai/model-api) for model-specific details
|
70
|
+
|
71
|
+
## Available Models
|
72
|
+
|
73
|
+
Z.ai provides several models including:
|
74
|
+
|
75
|
+
- **GLM-4.5**: Latest flagship model with reasoning, coding, and agent functionalities
|
76
|
+
- **GLM-4.5-Air**: Lightweight flagship model with cost-effectiveness
|
77
|
+
- **GLM-4.5-Flash**: Most advanced free model
|
78
|
+
- **GLM-4-32B-0414-128K**: General-purpose LLM for business and technical domains
|
79
|
+
- **CogVideoX-3**: Text-to-video model for high-fidelity motion
|
80
|
+
- **Vidu Q1**: High-fidelity 1080p video generation
|
81
|
+
- **Vidu 2**: Fast, low-cost 720p video generation
|
82
|
+
|
83
|
+
For complete model specifications and capabilities, visit [Z.ai Models](https://z.ai/model-api).
|
@@ -12,7 +12,7 @@ from queue import Queue
|
|
12
12
|
from rich import print as rich_print
|
13
13
|
from janito.tools import get_local_tools_adapter
|
14
14
|
from janito.llm.agent import LLMAgent
|
15
|
-
|
15
|
+
|
16
16
|
from janito.platform_discovery import PlatformDiscovery
|
17
17
|
from janito.tools.tool_base import ToolPermissions
|
18
18
|
from janito.tools.permissions import get_global_allowed_permissions
|
@@ -109,6 +109,9 @@ class ChatSession:
|
|
109
109
|
)
|
110
110
|
self._support = False
|
111
111
|
|
112
|
+
# Check if multi-line mode should be enabled by default
|
113
|
+
self.multi_line_mode = getattr(args, "multi", False) if args else False
|
114
|
+
|
112
115
|
def _select_profile_and_role(self, args, role):
|
113
116
|
profile = getattr(args, "profile", None) if args is not None else None
|
114
117
|
role_arg = getattr(args, "role", None) if args is not None else None
|
@@ -213,6 +216,11 @@ class ChatSession:
|
|
213
216
|
f"[green]Working Dir:[/green] {cwd_display} | {priv_status}"
|
214
217
|
)
|
215
218
|
|
219
|
+
if self.multi_line_mode:
|
220
|
+
self.console.print(
|
221
|
+
"[blue]Multi-line input mode enabled (Esc+Enter or Ctrl+D to submit)[/blue]"
|
222
|
+
)
|
223
|
+
|
216
224
|
from janito.cli.chat_mode.shell.commands._priv_check import (
|
217
225
|
user_has_any_privileges,
|
218
226
|
)
|
@@ -305,6 +313,7 @@ class ChatSession:
|
|
305
313
|
bottom_toolbar=lambda: get_toolbar_func(
|
306
314
|
self.performance_collector, 0, self.shell_state
|
307
315
|
)(),
|
316
|
+
multiline=self.multi_line_mode,
|
308
317
|
)
|
309
318
|
|
310
319
|
def _handle_input(self, session):
|
@@ -0,0 +1,137 @@
|
|
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 get_driver_info():
|
17
|
+
"""Get information about all available drivers."""
|
18
|
+
drivers = []
|
19
|
+
|
20
|
+
# Define known driver modules
|
21
|
+
driver_modules = [
|
22
|
+
("janito.drivers.openai.driver", "OpenAIModelDriver"),
|
23
|
+
("janito.drivers.azure_openai.driver", "AzureOpenAIModelDriver"),
|
24
|
+
("janito.drivers.zai.driver", "ZAIModelDriver"),
|
25
|
+
]
|
26
|
+
|
27
|
+
for module_path, class_name in driver_modules:
|
28
|
+
try:
|
29
|
+
# Import the module
|
30
|
+
module = importlib.import_module(module_path)
|
31
|
+
driver_class = getattr(module, class_name)
|
32
|
+
|
33
|
+
# Get availability info
|
34
|
+
available = getattr(driver_class, 'available', True)
|
35
|
+
unavailable_reason = getattr(driver_class, 'unavailable_reason', None)
|
36
|
+
|
37
|
+
# Get dependencies from module imports
|
38
|
+
dependencies = []
|
39
|
+
module_file = Path(module.__file__)
|
40
|
+
|
41
|
+
# Read module file to detect imports
|
42
|
+
with open(module_file, 'r', encoding='utf-8') as f:
|
43
|
+
content = f.read()
|
44
|
+
|
45
|
+
# Simple dependency detection
|
46
|
+
if 'import openai' in content or 'from openai' in content:
|
47
|
+
dependencies.append('openai')
|
48
|
+
if 'import zai' in content or 'from zai' in content:
|
49
|
+
dependencies.append('zai')
|
50
|
+
if 'import anthropic' in content or 'from anthropic' in content:
|
51
|
+
dependencies.append('anthropic')
|
52
|
+
if 'import google' in content or 'from google' in content:
|
53
|
+
dependencies.append('google-generativeai')
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
# Remove duplicates while preserving order
|
58
|
+
seen = set()
|
59
|
+
dependencies = [dep for dep in dependencies if not (dep in seen or seen.add(dep))]
|
60
|
+
|
61
|
+
# Check if dependencies are available
|
62
|
+
dep_status = []
|
63
|
+
for dep in dependencies:
|
64
|
+
try:
|
65
|
+
importlib.import_module(dep)
|
66
|
+
dep_status.append(f"✅ {dep}")
|
67
|
+
except ImportError:
|
68
|
+
dep_status.append(f"❌ {dep}")
|
69
|
+
|
70
|
+
if not dependencies:
|
71
|
+
dep_status = ["No external dependencies"]
|
72
|
+
|
73
|
+
drivers.append({
|
74
|
+
'name': class_name,
|
75
|
+
'available': available,
|
76
|
+
'reason': unavailable_reason,
|
77
|
+
'dependencies': dep_status
|
78
|
+
})
|
79
|
+
|
80
|
+
except (ImportError, AttributeError) as e:
|
81
|
+
drivers.append({
|
82
|
+
'name': class_name,
|
83
|
+
'module': module_path,
|
84
|
+
'available': False,
|
85
|
+
'reason': str(e),
|
86
|
+
'dependencies': ["❌ Module not found"]
|
87
|
+
})
|
88
|
+
|
89
|
+
return drivers
|
90
|
+
|
91
|
+
|
92
|
+
def handle_list_drivers(args=None):
|
93
|
+
"""List all available LLM drivers with their status and dependencies."""
|
94
|
+
drivers = get_driver_info()
|
95
|
+
|
96
|
+
if not drivers:
|
97
|
+
console.print("[red]No drivers found[/red]")
|
98
|
+
return
|
99
|
+
|
100
|
+
# Create table
|
101
|
+
table = Table(title="Available LLM Drivers")
|
102
|
+
table.add_column("Driver", style="cyan", no_wrap=True)
|
103
|
+
table.add_column("Status", style="bold")
|
104
|
+
table.add_column("Dependencies", style="yellow")
|
105
|
+
|
106
|
+
for driver in drivers:
|
107
|
+
name = driver['name']
|
108
|
+
|
109
|
+
if driver['available']:
|
110
|
+
status = "[green]✅ Available[/green]"
|
111
|
+
if driver['reason']:
|
112
|
+
status = f"[yellow]⚠️ Available ({driver['reason']})[/yellow]"
|
113
|
+
else:
|
114
|
+
status = f"[red]❌ Unavailable[/red]"
|
115
|
+
if driver['reason']:
|
116
|
+
status = f"[red]❌ {driver['reason']}[/red]"
|
117
|
+
|
118
|
+
deps = "\n".join(driver['dependencies'])
|
119
|
+
|
120
|
+
table.add_row(name, status, deps)
|
121
|
+
|
122
|
+
console.print(table)
|
123
|
+
|
124
|
+
# Installation help
|
125
|
+
# Get unique missing dependencies
|
126
|
+
missing_deps = set()
|
127
|
+
for driver in drivers:
|
128
|
+
for dep_status in driver['dependencies']:
|
129
|
+
if dep_status.startswith('❌'):
|
130
|
+
missing_deps.add(dep_status[2:].strip())
|
131
|
+
|
132
|
+
if missing_deps:
|
133
|
+
console.print(f"\n[dim]💡 Install missing deps: pip install {' '.join(sorted(missing_deps))}[/dim]")
|
134
|
+
|
135
|
+
|
136
|
+
if __name__ == "__main__":
|
137
|
+
handle_list_drivers()
|
@@ -7,6 +7,7 @@ from janito.cli.cli_commands.list_models import handle_list_models
|
|
7
7
|
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
|
+
from janito.cli.cli_commands.list_drivers import handle_list_drivers
|
10
11
|
from functools import partial
|
11
12
|
from janito.provider_registry import ProviderRegistry
|
12
13
|
|
@@ -17,6 +18,7 @@ GETTER_KEYS = [
|
|
17
18
|
"list_models",
|
18
19
|
"list_tools",
|
19
20
|
"list_config",
|
21
|
+
"list_drivers",
|
20
22
|
]
|
21
23
|
|
22
24
|
|
@@ -42,7 +44,10 @@ def handle_getter(args, config_mgr=None):
|
|
42
44
|
"list_profiles": partial(handle_list_profiles, args),
|
43
45
|
"show_config": partial(handle_show_config, args),
|
44
46
|
"list_config": partial(handle_list_config, args),
|
47
|
+
"list_drivers": partial(handle_list_drivers, args),
|
45
48
|
}
|
46
49
|
for arg in GETTER_KEYS:
|
47
50
|
if getattr(args, arg, False) and arg in GETTER_DISPATCH:
|
48
|
-
|
51
|
+
GETTER_DISPATCH[arg]()
|
52
|
+
import sys
|
53
|
+
sys.exit(0)
|
@@ -0,0 +1,51 @@
|
|
1
|
+
"""
|
2
|
+
Module for guessing the provider based on model names.
|
3
|
+
"""
|
4
|
+
|
5
|
+
from janito.providers.registry import LLMProviderRegistry
|
6
|
+
|
7
|
+
|
8
|
+
def guess_provider_from_model(model_name: str) -> str:
|
9
|
+
"""
|
10
|
+
Guess the provider based on the model name.
|
11
|
+
|
12
|
+
Args:
|
13
|
+
model_name: The name of the model to guess the provider for
|
14
|
+
|
15
|
+
Returns:
|
16
|
+
The provider name if a match is found, None otherwise
|
17
|
+
"""
|
18
|
+
if not model_name:
|
19
|
+
return None
|
20
|
+
|
21
|
+
model_name = model_name.lower()
|
22
|
+
|
23
|
+
# Check each provider's models
|
24
|
+
for provider_name in LLMProviderRegistry.list_providers():
|
25
|
+
provider_class = LLMProviderRegistry.get(provider_name)
|
26
|
+
if not provider_class:
|
27
|
+
continue
|
28
|
+
|
29
|
+
# Get model specs for this provider
|
30
|
+
try:
|
31
|
+
if hasattr(provider_class, 'MODEL_SPECS'):
|
32
|
+
model_specs = provider_class.MODEL_SPECS
|
33
|
+
for spec_model_name in model_specs.keys():
|
34
|
+
if spec_model_name.lower() == model_name:
|
35
|
+
return provider_name
|
36
|
+
|
37
|
+
# Handle special cases like moonshotai
|
38
|
+
if provider_name == "moonshotai":
|
39
|
+
try:
|
40
|
+
from janito.providers.moonshotai.model_info import MOONSHOTAI_MODEL_SPECS
|
41
|
+
for spec_model_name in MOONSHOTAI_MODEL_SPECS.keys():
|
42
|
+
if spec_model_name.lower() == model_name:
|
43
|
+
return "moonshotai"
|
44
|
+
except ImportError:
|
45
|
+
pass
|
46
|
+
|
47
|
+
except Exception:
|
48
|
+
# Skip providers that have issues accessing model specs
|
49
|
+
continue
|
50
|
+
|
51
|
+
return None
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from janito.llm.driver_config import LLMDriverConfig
|
4
4
|
from janito.provider_config import get_config_provider
|
5
|
+
from janito.cli.core.model_guesser import guess_provider_from_model as _guess_provider_from_model
|
5
6
|
from janito.cli.verbose_output import print_verbose_info
|
6
7
|
|
7
8
|
|
@@ -14,6 +15,17 @@ def _choose_provider(args):
|
|
14
15
|
"Default provider", provider, style="magenta", align_content=True
|
15
16
|
)
|
16
17
|
elif provider is None:
|
18
|
+
# Try to guess provider based on model name if -m is provided
|
19
|
+
model = getattr(args, "model", None)
|
20
|
+
if model:
|
21
|
+
guessed_provider = _guess_provider_from_model(model)
|
22
|
+
if guessed_provider:
|
23
|
+
if getattr(args, "verbose", False):
|
24
|
+
print_verbose_info(
|
25
|
+
"Guessed provider", guessed_provider, style="magenta", align_content=True
|
26
|
+
)
|
27
|
+
return guessed_provider
|
28
|
+
|
17
29
|
print(
|
18
30
|
"Error: No provider selected and no provider found in config. Please set a provider using '-p PROVIDER', '--set provider=name', or configure a provider."
|
19
31
|
)
|
@@ -191,4 +203,4 @@ def handle_runner(
|
|
191
203
|
|
192
204
|
|
193
205
|
def get_prompt_mode(args):
|
194
|
-
return "single_shot" if getattr(args, "user_prompt", None) else "chat_mode"
|
206
|
+
return "single_shot" if getattr(args, "user_prompt", None) else "chat_mode"
|
@@ -21,6 +21,13 @@ definition = [
|
|
21
21
|
"help": "Disable path security: allow tool arguments to use any file/directory path (DANGEROUS)",
|
22
22
|
},
|
23
23
|
),
|
24
|
+
(
|
25
|
+
["--multi"],
|
26
|
+
{
|
27
|
+
"action": "store_true",
|
28
|
+
"help": "Start chat mode with multi-line input as default (no need for /multi command)",
|
29
|
+
},
|
30
|
+
),
|
24
31
|
(
|
25
32
|
["--profile"],
|
26
33
|
{
|
@@ -110,6 +117,10 @@ definition = [
|
|
110
117
|
["--list-providers"],
|
111
118
|
{"action": "store_true", "help": "List supported LLM providers"},
|
112
119
|
),
|
120
|
+
(
|
121
|
+
["--list-drivers"],
|
122
|
+
{"action": "store_true", "help": "List available LLM drivers and their dependencies"},
|
123
|
+
),
|
113
124
|
(
|
114
125
|
["-l", "--list-models"],
|
115
126
|
{"action": "store_true", "help": "List all supported models"},
|
@@ -199,6 +210,7 @@ GETTER_KEYS = [
|
|
199
210
|
"list_models",
|
200
211
|
"list_tools",
|
201
212
|
"list_config",
|
213
|
+
"list_drivers",
|
202
214
|
]
|
203
215
|
|
204
216
|
|
@@ -314,14 +326,8 @@ class JanitoCLI:
|
|
314
326
|
if run_mode == RunMode.SET:
|
315
327
|
if self._run_set_mode():
|
316
328
|
return
|
317
|
-
# Special handling: provider is not required for list_providers, list_tools, show_config
|
318
|
-
if run_mode == RunMode.GET
|
319
|
-
self.args.list_providers
|
320
|
-
or self.args.list_tools
|
321
|
-
or self.args.list_profiles
|
322
|
-
or self.args.show_config
|
323
|
-
or self.args.list_config
|
324
|
-
):
|
329
|
+
# Special handling: provider is not required for list_providers, list_tools, show_config, list_drivers
|
330
|
+
if run_mode == RunMode.GET:
|
325
331
|
self._maybe_print_verbose_provider_model()
|
326
332
|
handle_getter(self.args)
|
327
333
|
return
|
@@ -357,8 +363,7 @@ class JanitoCLI:
|
|
357
363
|
agent_role,
|
358
364
|
verbose_tools=self.args.verbose_tools,
|
359
365
|
)
|
360
|
-
|
361
|
-
handle_getter(self.args)
|
366
|
+
|
362
367
|
|
363
368
|
def _run_set_mode(self):
|
364
369
|
if handle_api_key_set(self.args):
|
@@ -44,9 +44,10 @@ class OpenAIModelDriver(LLMDriver):
|
|
44
44
|
|
45
45
|
tool_classes = self.tools_adapter.get_tool_classes()
|
46
46
|
tool_schemas = generate_tool_schemas(tool_classes)
|
47
|
-
|
47
|
+
if tool_schemas: # Only add tools if we have actual schemas
|
48
|
+
api_kwargs["tools"] = tool_schemas
|
48
49
|
except Exception as e:
|
49
|
-
|
50
|
+
# Don't add empty tools array - some providers reject it
|
50
51
|
if hasattr(config, "verbose_api") and config.verbose_api:
|
51
52
|
print(f"[OpenAIModelDriver] Tool schema generation failed: {e}")
|
52
53
|
# OpenAI-specific parameters
|
@@ -0,0 +1 @@
|
|
1
|
+
# Z.AI driver package
|