janito 2.17.0__tar.gz → 2.18.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.17.0 → janito-2.18.0}/CHANGELOG.md +8 -0
- {janito-2.17.0 → janito-2.18.0}/PKG-INFO +1 -1
- {janito-2.17.0 → janito-2.18.0}/docs/cerebras-setup.md +17 -0
- janito-2.18.0/docs/openai-setup.md +85 -0
- {janito-2.17.0 → janito-2.18.0}/docs/supported-providers-models.md +9 -1
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/session.py +32 -14
- {janito-2.17.0 → janito-2.18.0}/janito/providers/openai/model_info.py +33 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/openai/provider.py +1 -1
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/read_files.py +1 -1
- {janito-2.17.0 → janito-2.18.0}/janito/tools/path_security.py +14 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/tools_adapter.py +118 -26
- {janito-2.17.0 → janito-2.18.0}/janito.egg-info/PKG-INFO +1 -1
- {janito-2.17.0 → janito-2.18.0}/janito.egg-info/SOURCES.txt +1 -1
- {janito-2.17.0 → janito-2.18.0}/mkdocs.yml +2 -0
- {janito-2.17.0 → janito-2.18.0}/tests/adapters/local/test_read_files.py +1 -1
- janito-2.17.0/docs/index.md +0 -26
- {janito-2.17.0 → janito-2.18.0}/.codespellrc +0 -0
- {janito-2.17.0 → janito-2.18.0}/.gitattributes +0 -0
- {janito-2.17.0 → janito-2.18.0}/.github/workflows/python-app.yml.disabled +0 -0
- {janito-2.17.0 → janito-2.18.0}/.gitignore +0 -0
- {janito-2.17.0 → janito-2.18.0}/.pre-commit-config.yaml +0 -0
- {janito-2.17.0 → janito-2.18.0}/.secrets.baseline +0 -0
- {janito-2.17.0 → janito-2.18.0}/.vscode/settings.json +0 -0
- {janito-2.17.0 → janito-2.18.0}/CHANGELOG_2.16.0.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/LICENSE +0 -0
- {janito-2.17.0 → janito-2.18.0}/README-dev.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/README.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/UPDATING_DOCS.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/adding_mcp.txt +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/DIV.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/Interfaces.txt +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/TOOLBAR-STYLING.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/about/costs.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/about/vs-webchats.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/about/why.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/alternatives.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/code_intelligence/agentic-frameworks-comparison.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/code_intelligence/code-generation-challenges.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/code_intelligence/code-generation-observability.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/code_intelligence/our-approach.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/code_intelligence/why-string-replacement.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/concepts/analysis-style.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/concepts/human-guided-ai.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/concepts/index.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/concepts/language-model-clients.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/concepts/prompt-design-style.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/deepseek-setup.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/driver-flow.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/driver-request-cancellation.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/drivers/events.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/drivers.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/event-bus.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/guides/configuration.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/guides/developing.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/guides/disabled-tools.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/guides/installation.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/guides/profiles.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/guides/prompting/README.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/guides/single-shot-terminal.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/guides/terminal-shell.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/guides/tools-developer-guide.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/guides/using.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/guides/using_tools.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/imgs/code-generation-observability.png +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/imgs/code_generation_observability.png +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/imgs/happy-programmer.png +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/imgs/happy-programmer.svg +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/imgs/terminal-one-shot.png +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/imgs/terminal-shell.png +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/imgs/terminal_one_shot.png +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/imgs/terminal_shell.png +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/llm-drivers-required-config.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/llm-drivers.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/meta/developer-toolchain.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/meta/quality-checks.txt +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/moonshotai-setup.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/reference/api.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/reference/azure-openai.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/reference/cli-options.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/reference/message-handler-model.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/reference/rich-message-handler.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/security.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/tools/search-text.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/tools-index.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/tools-natural-results.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/tools-precision.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/docs/z-ai-setup.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/git_diff.txt +0 -0
- {janito-2.17.0 → janito-2.18.0}/github_diff +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/README.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/__main__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/_version.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/agent/setup_agent.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/agent/templates/profiles/system_prompt_template_Developer_with_Python_Tools.txt.j2 +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/agent/templates/profiles/system_prompt_template_developer.txt.j2 +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/agent/templates/profiles/system_prompt_template_model_conversation_without_tools_or_context.txt.j2 +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/bindings.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/chat_entry.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/prompt_style.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/script_runner.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/session_profile_select.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/autocomplete.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/_priv_check.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/_priv_status.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/bang.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/base.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/clear.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/conversation_restart.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/execute.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/help.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/history_view.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/lang.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/model.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/multi.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/privileges.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/prompt.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/read.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/role.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/session.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/session_control.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/tools.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/utility.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/verbose.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/write.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands.bak.zip +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/input_history.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/session/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/session/history.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/session/manager.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/session.bak.zip +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/toolbar.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/list_config.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/list_drivers.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/list_models.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/list_profiles.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/list_providers.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/list_providers_region.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/list_tools.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/model_selection.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/model_utils.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/set_api_key.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/show_config.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/show_system_prompt.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/config.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/console.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/core/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/core/event_logger.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/core/getters.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/core/model_guesser.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/core/runner.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/core/setters.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/core/unsetters.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/main.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/main_cli.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/prompt_core.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/prompt_handler.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/prompt_setup.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/rich_terminal_reporter.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/single_shot_mode/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/single_shot_mode/handler.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/utils.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/cli/verbose_output.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/config.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/config_manager.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/conversation_history.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/dir_walk_utils.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/docs/GETTING_STARTED.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/driver_events.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/drivers/azure_openai/driver.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/drivers/cerebras/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/drivers/dashscope.bak.zip +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/drivers/openai/README.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/drivers/openai/driver.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/drivers/openai_responses.bak.zip +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/drivers/zai/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/drivers/zai/driver.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/event_bus/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/event_bus/bus.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/event_bus/event.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/event_bus/handler.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/event_bus/queue_bus.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/exceptions.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/formatting.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/formatting_token.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/gitignore_utils.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/i18n/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/i18n/messages.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/i18n/pt.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/llm/README.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/llm/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/llm/agent.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/llm/auth.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/llm/auth_utils.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/llm/driver.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/llm/driver_config.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/llm/driver_config_builder.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/llm/driver_input.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/llm/message_parts.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/llm/model.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/llm/provider.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/mkdocs.yml +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/perf_singleton.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/performance_collector.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/platform_discovery.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/provider_config.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/provider_registry.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/alibaba/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/alibaba/model_info.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/alibaba/provider.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/anthropic/model_info.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/anthropic/provider.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/azure_openai/model_info.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/azure_openai/provider.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/cerebras/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/cerebras/model_info.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/cerebras/provider.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/dashscope.bak.zip +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/deepseek/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/deepseek/model_info.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/deepseek/provider.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/google/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/google/model_info.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/google/provider.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/moonshotai/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/moonshotai/model_info.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/moonshotai/provider.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/openai/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/openai/schema_generator.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/registry.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/zai/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/zai/model_info.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/zai/provider.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/providers/zai/schema_generator.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/regions/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/regions/cli.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/regions/geo_utils.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/regions/provider_regions.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/report_events.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/shell.bak.zip +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/DOCSTRING_STANDARD.txt +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/README.md +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/adapter.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/ask_user.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/copy_file.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/create_directory.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/create_file.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/delete_text_in_file.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/fetch_url.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/find_files.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/get_file_outline/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/get_file_outline/core.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/get_file_outline/java_outline.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/get_file_outline/markdown_outline.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/get_file_outline/python_outline.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/get_file_outline/search_outline.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/move_file.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/open_html_in_browser.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/open_url.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/python_code_run.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/python_command_run.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/python_file_run.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/remove_directory.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/remove_file.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/replace_text_in_file.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/run_bash_command.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/run_powershell_command.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/search_text/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/search_text/core.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/search_text/match_lines.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/search_text/pattern_utils.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/search_text/traverse_directory.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/__init__.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/core.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/css_validator.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/html_validator.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/js_validator.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/json_validator.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/markdown_validator.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/ps1_validator.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/python_validator.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/xml_validator.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/yaml_validator.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/view_file.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/disabled_tools.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/inspect_registry.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/outline_file.bak.zip +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/permissions.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/permissions_parse.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/tool_base.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/tool_events.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/tool_run_exception.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/tool_use_tracker.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/tool_utils.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/tools/tools_schema.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito/utils.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito.egg-info/dependency_links.txt +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito.egg-info/entry_points.txt +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito.egg-info/requires.txt +0 -0
- {janito-2.17.0 → janito-2.18.0}/janito.egg-info/top_level.txt +0 -0
- {janito-2.17.0 → janito-2.18.0}/pyproject.toml +0 -0
- {janito-2.17.0 → janito-2.18.0}/pytest.ini +0 -0
- {janito-2.17.0 → janito-2.18.0}/requirements-dev.txt +0 -0
- {janito-2.17.0 → janito-2.18.0}/requirements.txt +0 -0
- {janito-2.17.0 → janito-2.18.0}/setup.cfg +0 -0
- {janito-2.17.0 → janito-2.18.0}/tests/adapters/local/get_file_outline/test_core_outline.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/tests/test_cli_list_models.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/tests/test_cli_list_providers.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/tests/test_cli_list_providers_alibaba.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/tests/test_cli_list_providers_moonshotai.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/tests/test_cli_version.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/tests/test_disabled_tools.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/tests/test_provider_alibaba.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/tests/test_provider_cerebras.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/tests/test_provider_moonshotai.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/tools/release.py +0 -0
- {janito-2.17.0 → janito-2.18.0}/tox.ini +0 -0
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
## [Unreleased]
|
6
6
|
|
7
|
+
## [2.18.0] - 2025-08-07
|
8
|
+
|
9
|
+
### Added
|
10
|
+
|
11
|
+
- Added OpenAI GPT-5 models (gpt-5, gpt-5-mini, gpt-5-nano) and set default model to gpt-5
|
12
|
+
- Chat session: improved backend hostname detection
|
13
|
+
- Cleaned up test file
|
14
|
+
|
7
15
|
## [2.17.0] - 2025-08-05
|
8
16
|
|
9
17
|
### Added
|
@@ -42,6 +42,23 @@ janito -p cerebras -m qwen-3-coder-480b "Explain quantum computing"
|
|
42
42
|
|
43
43
|
Cerebras offers several models through their API:
|
44
44
|
|
45
|
+
**Production Models:**
|
46
|
+
|
47
|
+
- `llama-4-scout-17b-16e-instruct`
|
48
|
+
- `llama-3.3-70b`
|
49
|
+
- `llama3.1-8b`
|
50
|
+
- `qwen-3-32b`
|
51
|
+
|
52
|
+
**Preview Models:**
|
53
|
+
|
54
|
+
- `llama-4-maverick-17b-128e-instruct`
|
55
|
+
- `qwen-3-235b-a22b-instruct-2507`
|
56
|
+
- `qwen-3-235b-a22b-thinking-2507`
|
57
|
+
- `qwen-3-coder-480b`
|
58
|
+
- `gpt-oss-120b`
|
59
|
+
|
60
|
+
**Notes:**
|
61
|
+
|
45
62
|
- `qwen-3-coder-480b`: 32k context, reasoning-focused model with function calling support
|
46
63
|
|
47
64
|
## Troubleshooting
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# OpenAI Setup Guide
|
2
|
+
|
3
|
+
This guide will help you set up Janito to work with OpenAI's models.
|
4
|
+
|
5
|
+
## Prerequisites
|
6
|
+
|
7
|
+
1. An OpenAI account
|
8
|
+
2. An API key from OpenAI
|
9
|
+
|
10
|
+
## Getting an API Key
|
11
|
+
|
12
|
+
1. Go to [OpenAI's API Keys page](https://platform.openai.com/api-keys)
|
13
|
+
2. Sign in to your OpenAI account
|
14
|
+
3. Click on "Create new secret key"
|
15
|
+
4. Copy the generated key and save it in a secure location
|
16
|
+
|
17
|
+
## Configuration
|
18
|
+
|
19
|
+
You can configure your OpenAI API key in several ways:
|
20
|
+
|
21
|
+
### Option 1: Using the CLI
|
22
|
+
|
23
|
+
```bash
|
24
|
+
janito --set-api-key openai YOUR_API_KEY
|
25
|
+
```
|
26
|
+
|
27
|
+
### Option 2: Environment Variable
|
28
|
+
|
29
|
+
Set the `OPENAI_API_KEY` environment variable:
|
30
|
+
|
31
|
+
```bash
|
32
|
+
export OPENAI_API_KEY=YOUR_API_KEY
|
33
|
+
```
|
34
|
+
|
35
|
+
On Windows:
|
36
|
+
```cmd
|
37
|
+
set OPENAI_API_KEY=YOUR_API_KEY
|
38
|
+
```
|
39
|
+
|
40
|
+
### Option 3: Configuration File
|
41
|
+
|
42
|
+
Add the following to your Janito configuration file:
|
43
|
+
|
44
|
+
```yaml
|
45
|
+
providers:
|
46
|
+
openai:
|
47
|
+
api_key: YOUR_API_KEY
|
48
|
+
```
|
49
|
+
|
50
|
+
## Available Models
|
51
|
+
|
52
|
+
Janito supports the following OpenAI models:
|
53
|
+
|
54
|
+
- GPT-5 (default)
|
55
|
+
- GPT-5 Mini
|
56
|
+
- GPT-5 Nano
|
57
|
+
- GPT-4
|
58
|
+
- GPT-4 Turbo
|
59
|
+
- GPT-3.5 Turbo
|
60
|
+
|
61
|
+
## Usage
|
62
|
+
|
63
|
+
After configuration, you can use OpenAI models with Janito:
|
64
|
+
|
65
|
+
```bash
|
66
|
+
# Use the default model (GPT-5)
|
67
|
+
janito "Explain quantum computing"
|
68
|
+
|
69
|
+
# Specify a specific model
|
70
|
+
janito -m gpt-4 "Explain quantum computing"
|
71
|
+
|
72
|
+
# Use in chat mode
|
73
|
+
janito -c
|
74
|
+
|
75
|
+
# Use in chat mode with a specific model
|
76
|
+
janito -c -m gpt-4-turbo
|
77
|
+
```
|
78
|
+
|
79
|
+
## Troubleshooting
|
80
|
+
|
81
|
+
If you encounter issues:
|
82
|
+
|
83
|
+
1. Verify your API key is correct and active
|
84
|
+
2. Check that you have sufficient credits in your OpenAI account
|
85
|
+
3. Ensure your network connection can reach OpenAI's API endpoints
|
@@ -4,9 +4,14 @@ This page lists the supported providers and their available models.
|
|
4
4
|
|
5
5
|
## OpenAI
|
6
6
|
|
7
|
-
- GPT-
|
7
|
+
- GPT-5 (default)
|
8
|
+
- GPT-5 Mini
|
9
|
+
- GPT-5 Nano
|
8
10
|
- GPT-4
|
9
11
|
- GPT-4 Turbo
|
12
|
+
- GPT-3.5 Turbo
|
13
|
+
|
14
|
+
For setup instructions, see the [OpenAI Setup Guide](openai-setup.md).
|
10
15
|
|
11
16
|
## Google
|
12
17
|
|
@@ -47,12 +52,14 @@ This page lists the supported providers and their available models.
|
|
47
52
|
## Cerebras
|
48
53
|
|
49
54
|
**Production Models:**
|
55
|
+
|
50
56
|
- llama-4-scout-17b-16e-instruct
|
51
57
|
- llama-3.3-70b
|
52
58
|
- llama3.1-8b
|
53
59
|
- qwen-3-32b
|
54
60
|
|
55
61
|
**Preview Models:**
|
62
|
+
|
56
63
|
- llama-4-maverick-17b-128e-instruct
|
57
64
|
- qwen-3-235b-a22b-instruct-2507
|
58
65
|
- qwen-3-235b-a22b-thinking-2507
|
@@ -60,6 +67,7 @@ This page lists the supported providers and their available models.
|
|
60
67
|
- gpt-oss-120b
|
61
68
|
|
62
69
|
**Notes:**
|
70
|
+
|
63
71
|
- qwen-3-coder-480b: 32k context, reasoning-focused model with function calling support
|
64
72
|
|
65
73
|
<!-- Removed links to model_info.py files for all providers to avoid broken references. -->
|
@@ -296,21 +296,39 @@ class ChatSession:
|
|
296
296
|
else "Unknown"
|
297
297
|
)
|
298
298
|
|
299
|
-
# Get backend hostname if available
|
300
299
|
backend_hostname = "Unknown"
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
)
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
300
|
+
candidates = []
|
301
|
+
drv = getattr(self.agent, "driver", None)
|
302
|
+
if drv is not None:
|
303
|
+
cfg = getattr(drv, "config", None)
|
304
|
+
if cfg is not None:
|
305
|
+
b = getattr(cfg, "base_url", None)
|
306
|
+
if b:
|
307
|
+
candidates.append(b)
|
308
|
+
direct_base = getattr(drv, "base_url", None)
|
309
|
+
if direct_base:
|
310
|
+
candidates.append(direct_base)
|
311
|
+
cfg2 = getattr(self.agent, "config", None)
|
312
|
+
if cfg2 is not None:
|
313
|
+
b2 = getattr(cfg2, "base_url", None)
|
314
|
+
if b2:
|
315
|
+
candidates.append(b2)
|
316
|
+
top_base = getattr(self.agent, "base_url", None)
|
317
|
+
if top_base:
|
318
|
+
candidates.append(top_base)
|
319
|
+
from urllib.parse import urlparse
|
320
|
+
for candidate in candidates:
|
321
|
+
try:
|
322
|
+
if not candidate:
|
323
|
+
continue
|
324
|
+
parsed = urlparse(str(candidate))
|
325
|
+
host = parsed.netloc or parsed.path
|
326
|
+
if host:
|
327
|
+
backend_hostname = host
|
328
|
+
break
|
329
|
+
except Exception:
|
330
|
+
backend_hostname = str(candidate)
|
331
|
+
break
|
314
332
|
|
315
333
|
self.console.print(
|
316
334
|
Rule(
|
@@ -111,6 +111,39 @@ MODEL_SPECS = {
|
|
111
111
|
open="openai",
|
112
112
|
driver="OpenAIModelDriver",
|
113
113
|
),
|
114
|
+
"gpt-5": LLMModelInfo(
|
115
|
+
name="gpt-5",
|
116
|
+
context=200000,
|
117
|
+
max_input=100000,
|
118
|
+
max_cot="N/A",
|
119
|
+
max_response=100000,
|
120
|
+
thinking_supported=True,
|
121
|
+
default_temp=1.0,
|
122
|
+
open="openai",
|
123
|
+
driver="OpenAIModelDriver",
|
124
|
+
),
|
125
|
+
"gpt-5-mini": LLMModelInfo(
|
126
|
+
name="gpt-5-mini",
|
127
|
+
context=200000,
|
128
|
+
max_input=100000,
|
129
|
+
max_cot="N/A",
|
130
|
+
max_response=100000,
|
131
|
+
thinking_supported=True,
|
132
|
+
default_temp=1.0,
|
133
|
+
open="openai",
|
134
|
+
driver="OpenAIModelDriver",
|
135
|
+
),
|
136
|
+
"gpt-5-nano": LLMModelInfo(
|
137
|
+
name="gpt-5-nano",
|
138
|
+
context=200000,
|
139
|
+
max_input=100000,
|
140
|
+
max_cot="N/A",
|
141
|
+
max_response=100000,
|
142
|
+
thinking_supported=True,
|
143
|
+
default_temp=1.0,
|
144
|
+
open="openai",
|
145
|
+
driver="OpenAIModelDriver",
|
146
|
+
),
|
114
147
|
# duplicated gpt-4-turbo with minimal properties for distinction
|
115
148
|
"gpt-4-turbo-alt": LLMModelInfo(
|
116
149
|
name="gpt-4-turbo",
|
@@ -17,7 +17,7 @@ class OpenAIProvider(LLMProvider):
|
|
17
17
|
NAME = "openai"
|
18
18
|
MAINTAINER = "João Pinto <janito@ikignosis.org>"
|
19
19
|
MODEL_SPECS = MODEL_SPECS
|
20
|
-
DEFAULT_MODEL = "gpt-
|
20
|
+
DEFAULT_MODEL = "gpt-5" # Options: gpt-4.1, gpt-4o, o3-mini, o4-mini, gpt-5, gpt-5-nano
|
21
21
|
|
22
22
|
def __init__(
|
23
23
|
self, auth_manager: LLMAuthManager = None, config: LLMDriverConfig = None
|
@@ -135,6 +135,7 @@ def _extract_path_keys_from_schema(schema: Mapping[str, Any]) -> set[str]:
|
|
135
135
|
path_keys: set[str] = set()
|
136
136
|
if schema is not None:
|
137
137
|
for k, v in schema.get("properties", {}).items():
|
138
|
+
# Handle direct path strings
|
138
139
|
if v.get("format") == "path" or (
|
139
140
|
v.get("type") == "string"
|
140
141
|
and (
|
@@ -144,6 +145,19 @@ def _extract_path_keys_from_schema(schema: Mapping[str, Any]) -> set[str]:
|
|
144
145
|
)
|
145
146
|
):
|
146
147
|
path_keys.add(k)
|
148
|
+
# Handle arrays of path strings
|
149
|
+
elif v.get("type") == "array" and "items" in v:
|
150
|
+
items = v["items"]
|
151
|
+
if items.get("format") == "path" or (
|
152
|
+
items.get("type") == "string"
|
153
|
+
and (
|
154
|
+
"path" in items.get("description", "").lower()
|
155
|
+
or "path" in v.get("description", "").lower()
|
156
|
+
or k.endswith("paths")
|
157
|
+
or k == "paths"
|
158
|
+
)
|
159
|
+
):
|
160
|
+
path_keys.add(k)
|
147
161
|
return path_keys
|
148
162
|
|
149
163
|
|
@@ -131,9 +131,15 @@ class ToolsAdapterBase:
|
|
131
131
|
|
132
132
|
if arguments is None:
|
133
133
|
arguments = {}
|
134
|
-
#
|
134
|
+
# If arguments are provided as a non-dict (e.g. a list or a scalar)
|
135
|
+
# we skip signature *keyword* validation completely and defer the
|
136
|
+
# decision to Python's own call mechanics when the function is
|
137
|
+
# eventually invoked. This allows positional / variadic arguments to
|
138
|
+
# be supplied by callers that intentionally bypass the structured
|
139
|
+
# JSON-schema style interface.
|
135
140
|
if not isinstance(arguments, dict):
|
136
|
-
|
141
|
+
# Nothing to validate at this stage – treat as OK.
|
142
|
+
return None
|
137
143
|
|
138
144
|
sig = inspect.signature(func)
|
139
145
|
params = sig.parameters
|
@@ -193,30 +199,32 @@ class ToolsAdapterBase:
|
|
193
199
|
)
|
194
200
|
|
195
201
|
schema = getattr(tool, "schema", None)
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
from janito.report_events import (
|
205
|
-
ReportEvent,
|
206
|
-
ReportSubtype,
|
207
|
-
ReportAction,
|
202
|
+
# Only validate paths for dictionary-style arguments
|
203
|
+
if isinstance(arguments, dict):
|
204
|
+
try:
|
205
|
+
validate_paths_in_arguments(arguments, workdir, schema=schema)
|
206
|
+
except PathSecurityError as sec_err:
|
207
|
+
# Publish both a ToolCallError and a user-facing ReportEvent for path security errors
|
208
|
+
self._publish_tool_call_error(
|
209
|
+
tool_name, request_id, str(sec_err), arguments
|
208
210
|
)
|
211
|
+
if self._event_bus:
|
212
|
+
from janito.report_events import (
|
213
|
+
ReportEvent,
|
214
|
+
ReportSubtype,
|
215
|
+
ReportAction,
|
216
|
+
)
|
209
217
|
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
218
|
+
self._event_bus.publish(
|
219
|
+
ReportEvent(
|
220
|
+
subtype=ReportSubtype.ERROR,
|
221
|
+
message=f"[SECURITY] Path access denied: {sec_err}",
|
222
|
+
action=ReportAction.EXECUTE,
|
223
|
+
tool=tool_name,
|
224
|
+
context={"arguments": arguments, "request_id": request_id},
|
225
|
+
)
|
217
226
|
)
|
218
|
-
|
219
|
-
return f"Security error: {sec_err}"
|
227
|
+
return f"Security error: {sec_err}"
|
220
228
|
# --- END SECURITY ---
|
221
229
|
|
222
230
|
self._publish_tool_call_started(tool_name, request_id, arguments)
|
@@ -224,7 +232,18 @@ class ToolsAdapterBase:
|
|
224
232
|
f"[tools-adapter] Executing tool: {tool_name} with arguments: {arguments}"
|
225
233
|
)
|
226
234
|
try:
|
227
|
-
|
235
|
+
# Normalize arguments to ensure proper type handling
|
236
|
+
normalized_args = self._normalize_arguments(arguments, tool, func)
|
237
|
+
|
238
|
+
if isinstance(normalized_args, (list, tuple)):
|
239
|
+
# Positional arguments supplied as an array → expand as *args
|
240
|
+
result = self.execute(tool, *normalized_args, **kwargs)
|
241
|
+
elif isinstance(normalized_args, dict) or normalized_args is None:
|
242
|
+
# Keyword-style arguments (the default) – pass as **kwargs
|
243
|
+
result = self.execute(tool, **(normalized_args or {}), **kwargs)
|
244
|
+
else:
|
245
|
+
# Single positional argument (scalar/str/int/…)
|
246
|
+
result = self.execute(tool, normalized_args, **kwargs)
|
228
247
|
except Exception as e:
|
229
248
|
self._handle_execution_error(tool_name, request_id, e, arguments)
|
230
249
|
self._print_verbose(
|
@@ -281,6 +300,65 @@ class ToolsAdapterBase:
|
|
281
300
|
if self.verbose_tools:
|
282
301
|
print(message)
|
283
302
|
|
303
|
+
def _normalize_arguments(self, arguments, tool, func):
|
304
|
+
"""
|
305
|
+
Normalize arguments to ensure proper type handling at the adapter level.
|
306
|
+
|
307
|
+
This handles cases where:
|
308
|
+
1. String is passed instead of list for array parameters
|
309
|
+
2. JSON string parsing issues
|
310
|
+
3. Other type mismatches that can be automatically resolved
|
311
|
+
"""
|
312
|
+
import inspect
|
313
|
+
import json
|
314
|
+
|
315
|
+
# If arguments is already a dict or None, return as-is
|
316
|
+
if isinstance(arguments, dict) or arguments is None:
|
317
|
+
return arguments
|
318
|
+
|
319
|
+
# If arguments is a list/tuple, return as-is (positional args)
|
320
|
+
if isinstance(arguments, (list, tuple)):
|
321
|
+
return arguments
|
322
|
+
|
323
|
+
# Handle string arguments
|
324
|
+
if isinstance(arguments, str):
|
325
|
+
# Try to parse as JSON if it looks like JSON
|
326
|
+
stripped = arguments.strip()
|
327
|
+
if (stripped.startswith('{') and stripped.endswith('}')) or \
|
328
|
+
(stripped.startswith('[') and stripped.endswith(']')):
|
329
|
+
try:
|
330
|
+
parsed = json.loads(arguments)
|
331
|
+
return parsed
|
332
|
+
except json.JSONDecodeError:
|
333
|
+
# If it looks like JSON but failed, try to handle common issues
|
334
|
+
pass
|
335
|
+
|
336
|
+
# Check if the function expects a list parameter
|
337
|
+
try:
|
338
|
+
sig = inspect.signature(func)
|
339
|
+
params = list(sig.parameters.values())
|
340
|
+
|
341
|
+
# Skip 'self' parameter for methods
|
342
|
+
if len(params) > 0 and params[0].name == 'self':
|
343
|
+
params = params[1:]
|
344
|
+
|
345
|
+
# If there's exactly one parameter that expects a list, wrap string in list
|
346
|
+
if len(params) == 1:
|
347
|
+
param = params[0]
|
348
|
+
annotation = param.annotation
|
349
|
+
|
350
|
+
# Check if annotation is list[str] or similar
|
351
|
+
if hasattr(annotation, '__origin__') and annotation.__origin__ is list:
|
352
|
+
return [arguments]
|
353
|
+
elif str(annotation).startswith('list[') or str(annotation) == 'list':
|
354
|
+
return [arguments]
|
355
|
+
|
356
|
+
except (ValueError, TypeError):
|
357
|
+
pass
|
358
|
+
|
359
|
+
# Return original arguments for other cases
|
360
|
+
return arguments
|
361
|
+
|
284
362
|
def execute_function_call_message_part(self, function_call_message_part):
|
285
363
|
"""
|
286
364
|
Execute a FunctionCallMessagePart by extracting the tool name and arguments and dispatching to execute_by_name.
|
@@ -298,9 +376,23 @@ class ToolsAdapterBase:
|
|
298
376
|
# Parse arguments if they are a JSON string
|
299
377
|
if isinstance(arguments, str):
|
300
378
|
try:
|
379
|
+
# Try to parse as JSON first
|
301
380
|
arguments = json.loads(arguments)
|
302
|
-
except
|
303
|
-
|
381
|
+
except json.JSONDecodeError:
|
382
|
+
# Handle single quotes in JSON strings
|
383
|
+
try:
|
384
|
+
# Replace single quotes with double quotes for JSON compatibility
|
385
|
+
fixed_json = arguments.replace("'", '"')
|
386
|
+
arguments = json.loads(fixed_json)
|
387
|
+
except (json.JSONDecodeError, ValueError):
|
388
|
+
# If it's a string that looks like it might be a single path parameter,
|
389
|
+
# try to handle it gracefully
|
390
|
+
if arguments.startswith("{") and arguments.endswith("}"):
|
391
|
+
# Looks like JSON but failed to parse - this is likely an error
|
392
|
+
pass
|
393
|
+
else:
|
394
|
+
# Single string argument - let the normalization handle it
|
395
|
+
pass
|
304
396
|
if self.verbose_tools:
|
305
397
|
print(
|
306
398
|
f"[tools-adapter] Executing FunctionCallMessagePart: tool={tool_name}, arguments={arguments}, tool_call_id={tool_call_id}"
|
@@ -30,10 +30,10 @@ docs/driver-flow.md
|
|
30
30
|
docs/driver-request-cancellation.md
|
31
31
|
docs/drivers.md
|
32
32
|
docs/event-bus.md
|
33
|
-
docs/index.md
|
34
33
|
docs/llm-drivers-required-config.md
|
35
34
|
docs/llm-drivers.md
|
36
35
|
docs/moonshotai-setup.md
|
36
|
+
docs/openai-setup.md
|
37
37
|
docs/security.md
|
38
38
|
docs/supported-providers-models.md
|
39
39
|
docs/tools-index.md
|
@@ -35,9 +35,11 @@ nav:
|
|
35
35
|
- API Reference: reference/api.md
|
36
36
|
- Supported Providers & Models:
|
37
37
|
- Overview: supported-providers-models.md
|
38
|
+
- OpenAI Setup: openai-setup.md
|
38
39
|
- DeepSeek Setup: deepseek-setup.md
|
39
40
|
- MoonshotAI Setup: moonshotai-setup.md
|
40
41
|
- Z.ai Setup: z-ai-setup.md
|
42
|
+
- Cerebras Setup: cerebras-setup.md
|
41
43
|
- Concepts:
|
42
44
|
- Overview: concepts/index.md
|
43
45
|
- What Is a Language Model Client?: concepts/language-model-clients.md
|
@@ -16,7 +16,7 @@ def test_read_files_tool(tmp_path, read_files_tool):
|
|
16
16
|
file2.write_text("Second file contents.\n")
|
17
17
|
missing_file = tmp_path / "missing.txt"
|
18
18
|
|
19
|
-
result = read_files_tool.run([str(file1), str(file2), str(missing_file)])
|
19
|
+
result = read_files_tool.run(paths=[str(file1), str(file2), str(missing_file)])
|
20
20
|
|
21
21
|
assert "Hello from file 1!" in result
|
22
22
|
assert "Second file contents." in result
|
janito-2.17.0/docs/index.md
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
<p align="center">
|
2
|
-
<img src="imgs/happy-programmer.svg" alt="Janito Logo" width="180"/>
|
3
|
-
</p>
|
4
|
-
|
5
|
-
Janito is a lightweight language model client focused on software development activities, enabling automation of programming and project tasks through natural language using LLMs.
|
6
|
-
|
7
|
-
## ✨ Key Features
|
8
|
-
|
9
|
-
- ⚡ Automate code review, refactoring, and documentation
|
10
|
-
- 💬 Interactive pair programming chat mode
|
11
|
-
- 🖥️ Use via command-line with an optional web interface for complex manual edits
|
12
|
-
- 🔌 Easily extend with custom tools and plugins
|
13
|
-
- 🛡️ Robust configuration and quality checks
|
14
|
-
- 👨💻 Designed for developers, by developers
|
15
|
-
|
16
|
-
|
17
|
-
- - -
|
18
|
-
|
19
|
-
## 📚 Learn More
|
20
|
-
|
21
|
-
- [What Is a Language Model Client?](concepts/language-model-clients.md) — Thin vs. Thick Clients explained
|
22
|
-
- [Configuring Janito for DeepSeek](deepseek-setup.md) — How to set up and use DeepSeek models
|
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
|
25
|
-
- **Concepts & Terminology:** See the [concepts](concepts/index.md) section for more foundational explanations.
|
26
|
-
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|