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.
Files changed (323) hide show
  1. {janito-2.17.0 → janito-2.18.0}/CHANGELOG.md +8 -0
  2. {janito-2.17.0 → janito-2.18.0}/PKG-INFO +1 -1
  3. {janito-2.17.0 → janito-2.18.0}/docs/cerebras-setup.md +17 -0
  4. janito-2.18.0/docs/openai-setup.md +85 -0
  5. {janito-2.17.0 → janito-2.18.0}/docs/supported-providers-models.md +9 -1
  6. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/session.py +32 -14
  7. {janito-2.17.0 → janito-2.18.0}/janito/providers/openai/model_info.py +33 -0
  8. {janito-2.17.0 → janito-2.18.0}/janito/providers/openai/provider.py +1 -1
  9. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/read_files.py +1 -1
  10. {janito-2.17.0 → janito-2.18.0}/janito/tools/path_security.py +14 -0
  11. {janito-2.17.0 → janito-2.18.0}/janito/tools/tools_adapter.py +118 -26
  12. {janito-2.17.0 → janito-2.18.0}/janito.egg-info/PKG-INFO +1 -1
  13. {janito-2.17.0 → janito-2.18.0}/janito.egg-info/SOURCES.txt +1 -1
  14. {janito-2.17.0 → janito-2.18.0}/mkdocs.yml +2 -0
  15. {janito-2.17.0 → janito-2.18.0}/tests/adapters/local/test_read_files.py +1 -1
  16. janito-2.17.0/docs/index.md +0 -26
  17. {janito-2.17.0 → janito-2.18.0}/.codespellrc +0 -0
  18. {janito-2.17.0 → janito-2.18.0}/.gitattributes +0 -0
  19. {janito-2.17.0 → janito-2.18.0}/.github/workflows/python-app.yml.disabled +0 -0
  20. {janito-2.17.0 → janito-2.18.0}/.gitignore +0 -0
  21. {janito-2.17.0 → janito-2.18.0}/.pre-commit-config.yaml +0 -0
  22. {janito-2.17.0 → janito-2.18.0}/.secrets.baseline +0 -0
  23. {janito-2.17.0 → janito-2.18.0}/.vscode/settings.json +0 -0
  24. {janito-2.17.0 → janito-2.18.0}/CHANGELOG_2.16.0.md +0 -0
  25. {janito-2.17.0 → janito-2.18.0}/LICENSE +0 -0
  26. {janito-2.17.0 → janito-2.18.0}/README-dev.md +0 -0
  27. {janito-2.17.0 → janito-2.18.0}/README.md +0 -0
  28. {janito-2.17.0 → janito-2.18.0}/UPDATING_DOCS.md +0 -0
  29. {janito-2.17.0 → janito-2.18.0}/adding_mcp.txt +0 -0
  30. {janito-2.17.0 → janito-2.18.0}/docs/DIV.md +0 -0
  31. {janito-2.17.0 → janito-2.18.0}/docs/Interfaces.txt +0 -0
  32. {janito-2.17.0 → janito-2.18.0}/docs/TOOLBAR-STYLING.md +0 -0
  33. {janito-2.17.0 → janito-2.18.0}/docs/about/costs.md +0 -0
  34. {janito-2.17.0 → janito-2.18.0}/docs/about/vs-webchats.md +0 -0
  35. {janito-2.17.0 → janito-2.18.0}/docs/about/why.md +0 -0
  36. {janito-2.17.0 → janito-2.18.0}/docs/alternatives.md +0 -0
  37. {janito-2.17.0 → janito-2.18.0}/docs/code_intelligence/agentic-frameworks-comparison.md +0 -0
  38. {janito-2.17.0 → janito-2.18.0}/docs/code_intelligence/code-generation-challenges.md +0 -0
  39. {janito-2.17.0 → janito-2.18.0}/docs/code_intelligence/code-generation-observability.md +0 -0
  40. {janito-2.17.0 → janito-2.18.0}/docs/code_intelligence/our-approach.md +0 -0
  41. {janito-2.17.0 → janito-2.18.0}/docs/code_intelligence/why-string-replacement.md +0 -0
  42. {janito-2.17.0 → janito-2.18.0}/docs/concepts/analysis-style.md +0 -0
  43. {janito-2.17.0 → janito-2.18.0}/docs/concepts/human-guided-ai.md +0 -0
  44. {janito-2.17.0 → janito-2.18.0}/docs/concepts/index.md +0 -0
  45. {janito-2.17.0 → janito-2.18.0}/docs/concepts/language-model-clients.md +0 -0
  46. {janito-2.17.0 → janito-2.18.0}/docs/concepts/prompt-design-style.md +0 -0
  47. {janito-2.17.0 → janito-2.18.0}/docs/deepseek-setup.md +0 -0
  48. {janito-2.17.0 → janito-2.18.0}/docs/driver-flow.md +0 -0
  49. {janito-2.17.0 → janito-2.18.0}/docs/driver-request-cancellation.md +0 -0
  50. {janito-2.17.0 → janito-2.18.0}/docs/drivers/events.md +0 -0
  51. {janito-2.17.0 → janito-2.18.0}/docs/drivers.md +0 -0
  52. {janito-2.17.0 → janito-2.18.0}/docs/event-bus.md +0 -0
  53. {janito-2.17.0 → janito-2.18.0}/docs/guides/configuration.md +0 -0
  54. {janito-2.17.0 → janito-2.18.0}/docs/guides/developing.md +0 -0
  55. {janito-2.17.0 → janito-2.18.0}/docs/guides/disabled-tools.md +0 -0
  56. {janito-2.17.0 → janito-2.18.0}/docs/guides/installation.md +0 -0
  57. {janito-2.17.0 → janito-2.18.0}/docs/guides/profiles.md +0 -0
  58. {janito-2.17.0 → janito-2.18.0}/docs/guides/prompting/README.md +0 -0
  59. {janito-2.17.0 → janito-2.18.0}/docs/guides/single-shot-terminal.md +0 -0
  60. {janito-2.17.0 → janito-2.18.0}/docs/guides/terminal-shell.md +0 -0
  61. {janito-2.17.0 → janito-2.18.0}/docs/guides/tools-developer-guide.md +0 -0
  62. {janito-2.17.0 → janito-2.18.0}/docs/guides/using.md +0 -0
  63. {janito-2.17.0 → janito-2.18.0}/docs/guides/using_tools.md +0 -0
  64. {janito-2.17.0 → janito-2.18.0}/docs/imgs/code-generation-observability.png +0 -0
  65. {janito-2.17.0 → janito-2.18.0}/docs/imgs/code_generation_observability.png +0 -0
  66. {janito-2.17.0 → janito-2.18.0}/docs/imgs/happy-programmer.png +0 -0
  67. {janito-2.17.0 → janito-2.18.0}/docs/imgs/happy-programmer.svg +0 -0
  68. {janito-2.17.0 → janito-2.18.0}/docs/imgs/terminal-one-shot.png +0 -0
  69. {janito-2.17.0 → janito-2.18.0}/docs/imgs/terminal-shell.png +0 -0
  70. {janito-2.17.0 → janito-2.18.0}/docs/imgs/terminal_one_shot.png +0 -0
  71. {janito-2.17.0 → janito-2.18.0}/docs/imgs/terminal_shell.png +0 -0
  72. {janito-2.17.0 → janito-2.18.0}/docs/llm-drivers-required-config.md +0 -0
  73. {janito-2.17.0 → janito-2.18.0}/docs/llm-drivers.md +0 -0
  74. {janito-2.17.0 → janito-2.18.0}/docs/meta/developer-toolchain.md +0 -0
  75. {janito-2.17.0 → janito-2.18.0}/docs/meta/quality-checks.txt +0 -0
  76. {janito-2.17.0 → janito-2.18.0}/docs/moonshotai-setup.md +0 -0
  77. {janito-2.17.0 → janito-2.18.0}/docs/reference/api.md +0 -0
  78. {janito-2.17.0 → janito-2.18.0}/docs/reference/azure-openai.md +0 -0
  79. {janito-2.17.0 → janito-2.18.0}/docs/reference/cli-options.md +0 -0
  80. {janito-2.17.0 → janito-2.18.0}/docs/reference/message-handler-model.md +0 -0
  81. {janito-2.17.0 → janito-2.18.0}/docs/reference/rich-message-handler.md +0 -0
  82. {janito-2.17.0 → janito-2.18.0}/docs/security.md +0 -0
  83. {janito-2.17.0 → janito-2.18.0}/docs/tools/search-text.md +0 -0
  84. {janito-2.17.0 → janito-2.18.0}/docs/tools-index.md +0 -0
  85. {janito-2.17.0 → janito-2.18.0}/docs/tools-natural-results.md +0 -0
  86. {janito-2.17.0 → janito-2.18.0}/docs/tools-precision.md +0 -0
  87. {janito-2.17.0 → janito-2.18.0}/docs/z-ai-setup.md +0 -0
  88. {janito-2.17.0 → janito-2.18.0}/git_diff.txt +0 -0
  89. {janito-2.17.0 → janito-2.18.0}/github_diff +0 -0
  90. {janito-2.17.0 → janito-2.18.0}/janito/README.md +0 -0
  91. {janito-2.17.0 → janito-2.18.0}/janito/__init__.py +0 -0
  92. {janito-2.17.0 → janito-2.18.0}/janito/__main__.py +0 -0
  93. {janito-2.17.0 → janito-2.18.0}/janito/_version.py +0 -0
  94. {janito-2.17.0 → janito-2.18.0}/janito/agent/setup_agent.py +0 -0
  95. {janito-2.17.0 → janito-2.18.0}/janito/agent/templates/profiles/system_prompt_template_Developer_with_Python_Tools.txt.j2 +0 -0
  96. {janito-2.17.0 → janito-2.18.0}/janito/agent/templates/profiles/system_prompt_template_developer.txt.j2 +0 -0
  97. {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
  98. {janito-2.17.0 → janito-2.18.0}/janito/cli/__init__.py +0 -0
  99. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/bindings.py +0 -0
  100. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/chat_entry.py +0 -0
  101. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/prompt_style.py +0 -0
  102. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/script_runner.py +0 -0
  103. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/session_profile_select.py +0 -0
  104. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/autocomplete.py +0 -0
  105. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/__init__.py +0 -0
  106. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/_priv_check.py +0 -0
  107. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/_priv_status.py +0 -0
  108. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/bang.py +0 -0
  109. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/base.py +0 -0
  110. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/clear.py +0 -0
  111. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/conversation_restart.py +0 -0
  112. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/execute.py +0 -0
  113. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/help.py +0 -0
  114. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/history_view.py +0 -0
  115. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/lang.py +0 -0
  116. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/model.py +0 -0
  117. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/multi.py +0 -0
  118. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/privileges.py +0 -0
  119. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/prompt.py +0 -0
  120. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/read.py +0 -0
  121. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/role.py +0 -0
  122. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/session.py +0 -0
  123. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/session_control.py +0 -0
  124. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/tools.py +0 -0
  125. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/utility.py +0 -0
  126. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/verbose.py +0 -0
  127. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands/write.py +0 -0
  128. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/commands.bak.zip +0 -0
  129. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/input_history.py +0 -0
  130. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/session/__init__.py +0 -0
  131. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/session/history.py +0 -0
  132. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/session/manager.py +0 -0
  133. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/shell/session.bak.zip +0 -0
  134. {janito-2.17.0 → janito-2.18.0}/janito/cli/chat_mode/toolbar.py +0 -0
  135. {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/list_config.py +0 -0
  136. {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/list_drivers.py +0 -0
  137. {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/list_models.py +0 -0
  138. {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/list_profiles.py +0 -0
  139. {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/list_providers.py +0 -0
  140. {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/list_providers_region.py +0 -0
  141. {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/list_tools.py +0 -0
  142. {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/model_selection.py +0 -0
  143. {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/model_utils.py +0 -0
  144. {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/set_api_key.py +0 -0
  145. {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/show_config.py +0 -0
  146. {janito-2.17.0 → janito-2.18.0}/janito/cli/cli_commands/show_system_prompt.py +0 -0
  147. {janito-2.17.0 → janito-2.18.0}/janito/cli/config.py +0 -0
  148. {janito-2.17.0 → janito-2.18.0}/janito/cli/console.py +0 -0
  149. {janito-2.17.0 → janito-2.18.0}/janito/cli/core/__init__.py +0 -0
  150. {janito-2.17.0 → janito-2.18.0}/janito/cli/core/event_logger.py +0 -0
  151. {janito-2.17.0 → janito-2.18.0}/janito/cli/core/getters.py +0 -0
  152. {janito-2.17.0 → janito-2.18.0}/janito/cli/core/model_guesser.py +0 -0
  153. {janito-2.17.0 → janito-2.18.0}/janito/cli/core/runner.py +0 -0
  154. {janito-2.17.0 → janito-2.18.0}/janito/cli/core/setters.py +0 -0
  155. {janito-2.17.0 → janito-2.18.0}/janito/cli/core/unsetters.py +0 -0
  156. {janito-2.17.0 → janito-2.18.0}/janito/cli/main.py +0 -0
  157. {janito-2.17.0 → janito-2.18.0}/janito/cli/main_cli.py +0 -0
  158. {janito-2.17.0 → janito-2.18.0}/janito/cli/prompt_core.py +0 -0
  159. {janito-2.17.0 → janito-2.18.0}/janito/cli/prompt_handler.py +0 -0
  160. {janito-2.17.0 → janito-2.18.0}/janito/cli/prompt_setup.py +0 -0
  161. {janito-2.17.0 → janito-2.18.0}/janito/cli/rich_terminal_reporter.py +0 -0
  162. {janito-2.17.0 → janito-2.18.0}/janito/cli/single_shot_mode/__init__.py +0 -0
  163. {janito-2.17.0 → janito-2.18.0}/janito/cli/single_shot_mode/handler.py +0 -0
  164. {janito-2.17.0 → janito-2.18.0}/janito/cli/utils.py +0 -0
  165. {janito-2.17.0 → janito-2.18.0}/janito/cli/verbose_output.py +0 -0
  166. {janito-2.17.0 → janito-2.18.0}/janito/config.py +0 -0
  167. {janito-2.17.0 → janito-2.18.0}/janito/config_manager.py +0 -0
  168. {janito-2.17.0 → janito-2.18.0}/janito/conversation_history.py +0 -0
  169. {janito-2.17.0 → janito-2.18.0}/janito/dir_walk_utils.py +0 -0
  170. {janito-2.17.0 → janito-2.18.0}/janito/docs/GETTING_STARTED.md +0 -0
  171. {janito-2.17.0 → janito-2.18.0}/janito/driver_events.py +0 -0
  172. {janito-2.17.0 → janito-2.18.0}/janito/drivers/azure_openai/driver.py +0 -0
  173. {janito-2.17.0 → janito-2.18.0}/janito/drivers/cerebras/__init__.py +0 -0
  174. {janito-2.17.0 → janito-2.18.0}/janito/drivers/dashscope.bak.zip +0 -0
  175. {janito-2.17.0 → janito-2.18.0}/janito/drivers/openai/README.md +0 -0
  176. {janito-2.17.0 → janito-2.18.0}/janito/drivers/openai/driver.py +0 -0
  177. {janito-2.17.0 → janito-2.18.0}/janito/drivers/openai_responses.bak.zip +0 -0
  178. {janito-2.17.0 → janito-2.18.0}/janito/drivers/zai/__init__.py +0 -0
  179. {janito-2.17.0 → janito-2.18.0}/janito/drivers/zai/driver.py +0 -0
  180. {janito-2.17.0 → janito-2.18.0}/janito/event_bus/__init__.py +0 -0
  181. {janito-2.17.0 → janito-2.18.0}/janito/event_bus/bus.py +0 -0
  182. {janito-2.17.0 → janito-2.18.0}/janito/event_bus/event.py +0 -0
  183. {janito-2.17.0 → janito-2.18.0}/janito/event_bus/handler.py +0 -0
  184. {janito-2.17.0 → janito-2.18.0}/janito/event_bus/queue_bus.py +0 -0
  185. {janito-2.17.0 → janito-2.18.0}/janito/exceptions.py +0 -0
  186. {janito-2.17.0 → janito-2.18.0}/janito/formatting.py +0 -0
  187. {janito-2.17.0 → janito-2.18.0}/janito/formatting_token.py +0 -0
  188. {janito-2.17.0 → janito-2.18.0}/janito/gitignore_utils.py +0 -0
  189. {janito-2.17.0 → janito-2.18.0}/janito/i18n/__init__.py +0 -0
  190. {janito-2.17.0 → janito-2.18.0}/janito/i18n/messages.py +0 -0
  191. {janito-2.17.0 → janito-2.18.0}/janito/i18n/pt.py +0 -0
  192. {janito-2.17.0 → janito-2.18.0}/janito/llm/README.md +0 -0
  193. {janito-2.17.0 → janito-2.18.0}/janito/llm/__init__.py +0 -0
  194. {janito-2.17.0 → janito-2.18.0}/janito/llm/agent.py +0 -0
  195. {janito-2.17.0 → janito-2.18.0}/janito/llm/auth.py +0 -0
  196. {janito-2.17.0 → janito-2.18.0}/janito/llm/auth_utils.py +0 -0
  197. {janito-2.17.0 → janito-2.18.0}/janito/llm/driver.py +0 -0
  198. {janito-2.17.0 → janito-2.18.0}/janito/llm/driver_config.py +0 -0
  199. {janito-2.17.0 → janito-2.18.0}/janito/llm/driver_config_builder.py +0 -0
  200. {janito-2.17.0 → janito-2.18.0}/janito/llm/driver_input.py +0 -0
  201. {janito-2.17.0 → janito-2.18.0}/janito/llm/message_parts.py +0 -0
  202. {janito-2.17.0 → janito-2.18.0}/janito/llm/model.py +0 -0
  203. {janito-2.17.0 → janito-2.18.0}/janito/llm/provider.py +0 -0
  204. {janito-2.17.0 → janito-2.18.0}/janito/mkdocs.yml +0 -0
  205. {janito-2.17.0 → janito-2.18.0}/janito/perf_singleton.py +0 -0
  206. {janito-2.17.0 → janito-2.18.0}/janito/performance_collector.py +0 -0
  207. {janito-2.17.0 → janito-2.18.0}/janito/platform_discovery.py +0 -0
  208. {janito-2.17.0 → janito-2.18.0}/janito/provider_config.py +0 -0
  209. {janito-2.17.0 → janito-2.18.0}/janito/provider_registry.py +0 -0
  210. {janito-2.17.0 → janito-2.18.0}/janito/providers/__init__.py +0 -0
  211. {janito-2.17.0 → janito-2.18.0}/janito/providers/alibaba/__init__.py +0 -0
  212. {janito-2.17.0 → janito-2.18.0}/janito/providers/alibaba/model_info.py +0 -0
  213. {janito-2.17.0 → janito-2.18.0}/janito/providers/alibaba/provider.py +0 -0
  214. {janito-2.17.0 → janito-2.18.0}/janito/providers/anthropic/model_info.py +0 -0
  215. {janito-2.17.0 → janito-2.18.0}/janito/providers/anthropic/provider.py +0 -0
  216. {janito-2.17.0 → janito-2.18.0}/janito/providers/azure_openai/model_info.py +0 -0
  217. {janito-2.17.0 → janito-2.18.0}/janito/providers/azure_openai/provider.py +0 -0
  218. {janito-2.17.0 → janito-2.18.0}/janito/providers/cerebras/__init__.py +0 -0
  219. {janito-2.17.0 → janito-2.18.0}/janito/providers/cerebras/model_info.py +0 -0
  220. {janito-2.17.0 → janito-2.18.0}/janito/providers/cerebras/provider.py +0 -0
  221. {janito-2.17.0 → janito-2.18.0}/janito/providers/dashscope.bak.zip +0 -0
  222. {janito-2.17.0 → janito-2.18.0}/janito/providers/deepseek/__init__.py +0 -0
  223. {janito-2.17.0 → janito-2.18.0}/janito/providers/deepseek/model_info.py +0 -0
  224. {janito-2.17.0 → janito-2.18.0}/janito/providers/deepseek/provider.py +0 -0
  225. {janito-2.17.0 → janito-2.18.0}/janito/providers/google/__init__.py +0 -0
  226. {janito-2.17.0 → janito-2.18.0}/janito/providers/google/model_info.py +0 -0
  227. {janito-2.17.0 → janito-2.18.0}/janito/providers/google/provider.py +0 -0
  228. {janito-2.17.0 → janito-2.18.0}/janito/providers/moonshotai/__init__.py +0 -0
  229. {janito-2.17.0 → janito-2.18.0}/janito/providers/moonshotai/model_info.py +0 -0
  230. {janito-2.17.0 → janito-2.18.0}/janito/providers/moonshotai/provider.py +0 -0
  231. {janito-2.17.0 → janito-2.18.0}/janito/providers/openai/__init__.py +0 -0
  232. {janito-2.17.0 → janito-2.18.0}/janito/providers/openai/schema_generator.py +0 -0
  233. {janito-2.17.0 → janito-2.18.0}/janito/providers/registry.py +0 -0
  234. {janito-2.17.0 → janito-2.18.0}/janito/providers/zai/__init__.py +0 -0
  235. {janito-2.17.0 → janito-2.18.0}/janito/providers/zai/model_info.py +0 -0
  236. {janito-2.17.0 → janito-2.18.0}/janito/providers/zai/provider.py +0 -0
  237. {janito-2.17.0 → janito-2.18.0}/janito/providers/zai/schema_generator.py +0 -0
  238. {janito-2.17.0 → janito-2.18.0}/janito/regions/__init__.py +0 -0
  239. {janito-2.17.0 → janito-2.18.0}/janito/regions/cli.py +0 -0
  240. {janito-2.17.0 → janito-2.18.0}/janito/regions/geo_utils.py +0 -0
  241. {janito-2.17.0 → janito-2.18.0}/janito/regions/provider_regions.py +0 -0
  242. {janito-2.17.0 → janito-2.18.0}/janito/report_events.py +0 -0
  243. {janito-2.17.0 → janito-2.18.0}/janito/shell.bak.zip +0 -0
  244. {janito-2.17.0 → janito-2.18.0}/janito/tools/DOCSTRING_STANDARD.txt +0 -0
  245. {janito-2.17.0 → janito-2.18.0}/janito/tools/README.md +0 -0
  246. {janito-2.17.0 → janito-2.18.0}/janito/tools/__init__.py +0 -0
  247. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/__init__.py +0 -0
  248. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/__init__.py +0 -0
  249. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/adapter.py +0 -0
  250. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/ask_user.py +0 -0
  251. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/copy_file.py +0 -0
  252. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/create_directory.py +0 -0
  253. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/create_file.py +0 -0
  254. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/delete_text_in_file.py +0 -0
  255. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/fetch_url.py +0 -0
  256. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/find_files.py +0 -0
  257. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/get_file_outline/__init__.py +0 -0
  258. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/get_file_outline/core.py +0 -0
  259. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/get_file_outline/java_outline.py +0 -0
  260. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/get_file_outline/markdown_outline.py +0 -0
  261. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/get_file_outline/python_outline.py +0 -0
  262. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/get_file_outline/search_outline.py +0 -0
  263. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/move_file.py +0 -0
  264. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/open_html_in_browser.py +0 -0
  265. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/open_url.py +0 -0
  266. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/python_code_run.py +0 -0
  267. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/python_command_run.py +0 -0
  268. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/python_file_run.py +0 -0
  269. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/remove_directory.py +0 -0
  270. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/remove_file.py +0 -0
  271. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/replace_text_in_file.py +0 -0
  272. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/run_bash_command.py +0 -0
  273. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/run_powershell_command.py +0 -0
  274. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/search_text/__init__.py +0 -0
  275. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/search_text/core.py +0 -0
  276. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/search_text/match_lines.py +0 -0
  277. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/search_text/pattern_utils.py +0 -0
  278. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/search_text/traverse_directory.py +0 -0
  279. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/__init__.py +0 -0
  280. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/core.py +0 -0
  281. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/css_validator.py +0 -0
  282. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/html_validator.py +0 -0
  283. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/js_validator.py +0 -0
  284. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/json_validator.py +0 -0
  285. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/markdown_validator.py +0 -0
  286. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/ps1_validator.py +0 -0
  287. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/python_validator.py +0 -0
  288. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/xml_validator.py +0 -0
  289. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/validate_file_syntax/yaml_validator.py +0 -0
  290. {janito-2.17.0 → janito-2.18.0}/janito/tools/adapters/local/view_file.py +0 -0
  291. {janito-2.17.0 → janito-2.18.0}/janito/tools/disabled_tools.py +0 -0
  292. {janito-2.17.0 → janito-2.18.0}/janito/tools/inspect_registry.py +0 -0
  293. {janito-2.17.0 → janito-2.18.0}/janito/tools/outline_file.bak.zip +0 -0
  294. {janito-2.17.0 → janito-2.18.0}/janito/tools/permissions.py +0 -0
  295. {janito-2.17.0 → janito-2.18.0}/janito/tools/permissions_parse.py +0 -0
  296. {janito-2.17.0 → janito-2.18.0}/janito/tools/tool_base.py +0 -0
  297. {janito-2.17.0 → janito-2.18.0}/janito/tools/tool_events.py +0 -0
  298. {janito-2.17.0 → janito-2.18.0}/janito/tools/tool_run_exception.py +0 -0
  299. {janito-2.17.0 → janito-2.18.0}/janito/tools/tool_use_tracker.py +0 -0
  300. {janito-2.17.0 → janito-2.18.0}/janito/tools/tool_utils.py +0 -0
  301. {janito-2.17.0 → janito-2.18.0}/janito/tools/tools_schema.py +0 -0
  302. {janito-2.17.0 → janito-2.18.0}/janito/utils.py +0 -0
  303. {janito-2.17.0 → janito-2.18.0}/janito.egg-info/dependency_links.txt +0 -0
  304. {janito-2.17.0 → janito-2.18.0}/janito.egg-info/entry_points.txt +0 -0
  305. {janito-2.17.0 → janito-2.18.0}/janito.egg-info/requires.txt +0 -0
  306. {janito-2.17.0 → janito-2.18.0}/janito.egg-info/top_level.txt +0 -0
  307. {janito-2.17.0 → janito-2.18.0}/pyproject.toml +0 -0
  308. {janito-2.17.0 → janito-2.18.0}/pytest.ini +0 -0
  309. {janito-2.17.0 → janito-2.18.0}/requirements-dev.txt +0 -0
  310. {janito-2.17.0 → janito-2.18.0}/requirements.txt +0 -0
  311. {janito-2.17.0 → janito-2.18.0}/setup.cfg +0 -0
  312. {janito-2.17.0 → janito-2.18.0}/tests/adapters/local/get_file_outline/test_core_outline.py +0 -0
  313. {janito-2.17.0 → janito-2.18.0}/tests/test_cli_list_models.py +0 -0
  314. {janito-2.17.0 → janito-2.18.0}/tests/test_cli_list_providers.py +0 -0
  315. {janito-2.17.0 → janito-2.18.0}/tests/test_cli_list_providers_alibaba.py +0 -0
  316. {janito-2.17.0 → janito-2.18.0}/tests/test_cli_list_providers_moonshotai.py +0 -0
  317. {janito-2.17.0 → janito-2.18.0}/tests/test_cli_version.py +0 -0
  318. {janito-2.17.0 → janito-2.18.0}/tests/test_disabled_tools.py +0 -0
  319. {janito-2.17.0 → janito-2.18.0}/tests/test_provider_alibaba.py +0 -0
  320. {janito-2.17.0 → janito-2.18.0}/tests/test_provider_cerebras.py +0 -0
  321. {janito-2.17.0 → janito-2.18.0}/tests/test_provider_moonshotai.py +0 -0
  322. {janito-2.17.0 → janito-2.18.0}/tools/release.py +0 -0
  323. {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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: janito
3
- Version: 2.17.0
3
+ Version: 2.18.0
4
4
  Summary: A new Python package called janito.
5
5
  Author-email: João Pinto <janito@ikignosis.org>
6
6
  Project-URL: Homepage, https://github.com/ikignosis/janito
@@ -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-3.5 Turbo
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
- 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
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-4.1" # Options: gpt-4.1, gpt-4o, o3-mini, o4-mini,
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
@@ -52,4 +52,4 @@ class ReadFilesTool(ToolBase):
52
52
  results.append(
53
53
  f"--- File: {disp_path} (error) ---\nError reading file: {e}\n"
54
54
  )
55
- return "\n".join(results)
55
+ return "\n".join(results)
@@ -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
- # Ensure the input is a dict to avoid breaking the inspect-based logic
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
- return "Tool arguments should be provided as an object / mapping"
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
- try:
197
- validate_paths_in_arguments(arguments, workdir, schema=schema)
198
- except PathSecurityError as sec_err:
199
- # Publish both a ToolCallError and a user-facing ReportEvent for path security errors
200
- self._publish_tool_call_error(
201
- tool_name, request_id, str(sec_err), arguments
202
- )
203
- if self._event_bus:
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
- self._event_bus.publish(
211
- ReportEvent(
212
- subtype=ReportSubtype.ERROR,
213
- message=f"[SECURITY] Path access denied: {sec_err}",
214
- action=ReportAction.EXECUTE,
215
- tool=tool_name,
216
- context={"arguments": arguments, "request_id": request_id},
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
- result = self.execute(tool, **(arguments or {}), **kwargs)
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 Exception:
303
- pass # Leave as string if not JSON
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}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: janito
3
- Version: 2.17.0
3
+ Version: 2.18.0
4
4
  Summary: A new Python package called janito.
5
5
  Author-email: João Pinto <janito@ikignosis.org>
6
6
  Project-URL: Homepage, https://github.com/ikignosis/janito
@@ -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
@@ -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