janito 2.19.1__tar.gz → 2.20.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 (333) hide show
  1. {janito-2.19.1 → janito-2.20.0}/CHANGELOG.md +19 -0
  2. {janito-2.19.1 → janito-2.20.0}/PKG-INFO +1 -1
  3. {janito-2.19.1 → janito-2.20.0}/docs/index.md +1 -0
  4. janito-2.20.0/docs/mistral-setup.md +180 -0
  5. janito-2.20.0/docs/provider-platform-access.md +26 -0
  6. {janito-2.19.1 → janito-2.20.0}/docs/supported-providers-models.md +16 -0
  7. {janito-2.19.1 → janito-2.20.0}/janito/cli/cli_commands/list_models.py +1 -3
  8. {janito-2.19.1 → janito-2.20.0}/janito/drivers/openai/driver.py +13 -7
  9. {janito-2.19.1 → janito-2.20.0}/janito/providers/__init__.py +1 -0
  10. janito-2.20.0/janito/providers/mistral/__init__.py +1 -0
  11. janito-2.20.0/janito/providers/mistral/model_info.py +81 -0
  12. janito-2.20.0/janito/providers/mistral/provider.py +124 -0
  13. {janito-2.19.1 → janito-2.20.0}/janito.egg-info/PKG-INFO +1 -1
  14. {janito-2.19.1 → janito-2.20.0}/janito.egg-info/SOURCES.txt +5 -0
  15. {janito-2.19.1 → janito-2.20.0}/mkdocs.yml +1 -0
  16. {janito-2.19.1 → janito-2.20.0}/.codespellrc +0 -0
  17. {janito-2.19.1 → janito-2.20.0}/.gitattributes +0 -0
  18. {janito-2.19.1 → janito-2.20.0}/.github/workflows/python-app.yml.disabled +0 -0
  19. {janito-2.19.1 → janito-2.20.0}/.gitignore +0 -0
  20. {janito-2.19.1 → janito-2.20.0}/.pre-commit-config.yaml +0 -0
  21. {janito-2.19.1 → janito-2.20.0}/.secrets.baseline +0 -0
  22. {janito-2.19.1 → janito-2.20.0}/.vscode/settings.json +0 -0
  23. {janito-2.19.1 → janito-2.20.0}/CHANGELOG_2.16.0.md +0 -0
  24. {janito-2.19.1 → janito-2.20.0}/LICENSE +0 -0
  25. {janito-2.19.1 → janito-2.20.0}/README-dev.md +0 -0
  26. {janito-2.19.1 → janito-2.20.0}/README.md +0 -0
  27. {janito-2.19.1 → janito-2.20.0}/UPDATING_DOCS.md +0 -0
  28. {janito-2.19.1 → janito-2.20.0}/adding_mcp.txt +0 -0
  29. {janito-2.19.1 → janito-2.20.0}/docs/DIV.md +0 -0
  30. {janito-2.19.1 → janito-2.20.0}/docs/Interfaces.txt +0 -0
  31. {janito-2.19.1 → janito-2.20.0}/docs/TOOLBAR-STYLING.md +0 -0
  32. {janito-2.19.1 → janito-2.20.0}/docs/about/costs.md +0 -0
  33. {janito-2.19.1 → janito-2.20.0}/docs/about/vs-webchats.md +0 -0
  34. {janito-2.19.1 → janito-2.20.0}/docs/about/why.md +0 -0
  35. {janito-2.19.1 → janito-2.20.0}/docs/alibaba-setup.md +0 -0
  36. {janito-2.19.1 → janito-2.20.0}/docs/alternatives.md +0 -0
  37. {janito-2.19.1 → janito-2.20.0}/docs/cerebras-setup.md +0 -0
  38. {janito-2.19.1 → janito-2.20.0}/docs/code_intelligence/agentic-frameworks-comparison.md +0 -0
  39. {janito-2.19.1 → janito-2.20.0}/docs/code_intelligence/code-generation-challenges.md +0 -0
  40. {janito-2.19.1 → janito-2.20.0}/docs/code_intelligence/code-generation-observability.md +0 -0
  41. {janito-2.19.1 → janito-2.20.0}/docs/code_intelligence/our-approach.md +0 -0
  42. {janito-2.19.1 → janito-2.20.0}/docs/code_intelligence/why-string-replacement.md +0 -0
  43. {janito-2.19.1 → janito-2.20.0}/docs/concepts/analysis-style.md +0 -0
  44. {janito-2.19.1 → janito-2.20.0}/docs/concepts/human-guided-ai.md +0 -0
  45. {janito-2.19.1 → janito-2.20.0}/docs/concepts/index.md +0 -0
  46. {janito-2.19.1 → janito-2.20.0}/docs/concepts/language-model-clients.md +0 -0
  47. {janito-2.19.1 → janito-2.20.0}/docs/concepts/prompt-design-style.md +0 -0
  48. {janito-2.19.1 → janito-2.20.0}/docs/deepseek-setup.md +0 -0
  49. {janito-2.19.1 → janito-2.20.0}/docs/driver-flow.md +0 -0
  50. {janito-2.19.1 → janito-2.20.0}/docs/driver-request-cancellation.md +0 -0
  51. {janito-2.19.1 → janito-2.20.0}/docs/drivers/events.md +0 -0
  52. {janito-2.19.1 → janito-2.20.0}/docs/drivers.md +0 -0
  53. {janito-2.19.1 → janito-2.20.0}/docs/event-bus.md +0 -0
  54. {janito-2.19.1 → janito-2.20.0}/docs/guides/configuration.md +0 -0
  55. {janito-2.19.1 → janito-2.20.0}/docs/guides/developing.md +0 -0
  56. {janito-2.19.1 → janito-2.20.0}/docs/guides/disabled-tools.md +0 -0
  57. {janito-2.19.1 → janito-2.20.0}/docs/guides/installation.md +0 -0
  58. {janito-2.19.1 → janito-2.20.0}/docs/guides/profiles.md +0 -0
  59. {janito-2.19.1 → janito-2.20.0}/docs/guides/prompting/README.md +0 -0
  60. {janito-2.19.1 → janito-2.20.0}/docs/guides/single-shot-terminal.md +0 -0
  61. {janito-2.19.1 → janito-2.20.0}/docs/guides/terminal-shell.md +0 -0
  62. {janito-2.19.1 → janito-2.20.0}/docs/guides/tools-developer-guide.md +0 -0
  63. {janito-2.19.1 → janito-2.20.0}/docs/guides/using.md +0 -0
  64. {janito-2.19.1 → janito-2.20.0}/docs/guides/using_tools.md +0 -0
  65. {janito-2.19.1 → janito-2.20.0}/docs/imgs/code-generation-observability.png +0 -0
  66. {janito-2.19.1 → janito-2.20.0}/docs/imgs/code_generation_observability.png +0 -0
  67. {janito-2.19.1 → janito-2.20.0}/docs/imgs/happy-programmer.png +0 -0
  68. {janito-2.19.1 → janito-2.20.0}/docs/imgs/happy-programmer.svg +0 -0
  69. {janito-2.19.1 → janito-2.20.0}/docs/imgs/terminal-one-shot.png +0 -0
  70. {janito-2.19.1 → janito-2.20.0}/docs/imgs/terminal-shell.png +0 -0
  71. {janito-2.19.1 → janito-2.20.0}/docs/imgs/terminal_one_shot.png +0 -0
  72. {janito-2.19.1 → janito-2.20.0}/docs/imgs/terminal_shell.png +0 -0
  73. {janito-2.19.1 → janito-2.20.0}/docs/llm-drivers-required-config.md +0 -0
  74. {janito-2.19.1 → janito-2.20.0}/docs/llm-drivers.md +0 -0
  75. {janito-2.19.1 → janito-2.20.0}/docs/meta/developer-toolchain.md +0 -0
  76. {janito-2.19.1 → janito-2.20.0}/docs/meta/quality-checks.txt +0 -0
  77. {janito-2.19.1 → janito-2.20.0}/docs/moonshotai-setup.md +0 -0
  78. {janito-2.19.1 → janito-2.20.0}/docs/openai-setup.md +0 -0
  79. {janito-2.19.1 → janito-2.20.0}/docs/overrides/partials/copyright.html +0 -0
  80. {janito-2.19.1 → janito-2.20.0}/docs/reference/api.md +0 -0
  81. {janito-2.19.1 → janito-2.20.0}/docs/reference/azure-openai.md +0 -0
  82. {janito-2.19.1 → janito-2.20.0}/docs/reference/cli-options.md +0 -0
  83. {janito-2.19.1 → janito-2.20.0}/docs/reference/message-handler-model.md +0 -0
  84. {janito-2.19.1 → janito-2.20.0}/docs/reference/rich-message-handler.md +0 -0
  85. {janito-2.19.1 → janito-2.20.0}/docs/security.md +0 -0
  86. {janito-2.19.1 → janito-2.20.0}/docs/tools/search-text.md +0 -0
  87. {janito-2.19.1 → janito-2.20.0}/docs/tools-index.md +0 -0
  88. {janito-2.19.1 → janito-2.20.0}/docs/tools-natural-results.md +0 -0
  89. {janito-2.19.1 → janito-2.20.0}/docs/tools-precision.md +0 -0
  90. {janito-2.19.1 → janito-2.20.0}/docs/z-ai-setup.md +0 -0
  91. {janito-2.19.1 → janito-2.20.0}/git_diff.txt +0 -0
  92. {janito-2.19.1 → janito-2.20.0}/github_diff +0 -0
  93. {janito-2.19.1 → janito-2.20.0}/janito/README.md +0 -0
  94. {janito-2.19.1 → janito-2.20.0}/janito/__init__.py +0 -0
  95. {janito-2.19.1 → janito-2.20.0}/janito/__main__.py +0 -0
  96. {janito-2.19.1 → janito-2.20.0}/janito/_version.py +0 -0
  97. {janito-2.19.1 → janito-2.20.0}/janito/agent/setup_agent.py +0 -0
  98. {janito-2.19.1 → janito-2.20.0}/janito/agent/templates/profiles/system_prompt_template_Developer_with_Python_Tools.txt.j2 +0 -0
  99. {janito-2.19.1 → janito-2.20.0}/janito/agent/templates/profiles/system_prompt_template_developer.txt.j2 +0 -0
  100. {janito-2.19.1 → janito-2.20.0}/janito/agent/templates/profiles/system_prompt_template_model_conversation_without_tools_or_context.txt.j2 +0 -0
  101. {janito-2.19.1 → janito-2.20.0}/janito/cli/__init__.py +0 -0
  102. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/bindings.py +0 -0
  103. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/chat_entry.py +0 -0
  104. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/prompt_style.py +0 -0
  105. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/script_runner.py +0 -0
  106. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/session.py +0 -0
  107. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/session_profile_select.py +0 -0
  108. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/autocomplete.py +0 -0
  109. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/__init__.py +0 -0
  110. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/_priv_check.py +0 -0
  111. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/_priv_status.py +0 -0
  112. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/bang.py +0 -0
  113. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/base.py +0 -0
  114. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/clear.py +0 -0
  115. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/conversation_restart.py +0 -0
  116. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/execute.py +0 -0
  117. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/help.py +0 -0
  118. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/history_view.py +0 -0
  119. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/lang.py +0 -0
  120. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/model.py +0 -0
  121. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/multi.py +0 -0
  122. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/privileges.py +0 -0
  123. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/prompt.py +0 -0
  124. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/read.py +0 -0
  125. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/role.py +0 -0
  126. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/session.py +0 -0
  127. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/session_control.py +0 -0
  128. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/tools.py +0 -0
  129. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/utility.py +0 -0
  130. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/verbose.py +0 -0
  131. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands/write.py +0 -0
  132. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/commands.bak.zip +0 -0
  133. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/input_history.py +0 -0
  134. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/session/__init__.py +0 -0
  135. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/session/history.py +0 -0
  136. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/session/manager.py +0 -0
  137. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/shell/session.bak.zip +0 -0
  138. {janito-2.19.1 → janito-2.20.0}/janito/cli/chat_mode/toolbar.py +0 -0
  139. {janito-2.19.1 → janito-2.20.0}/janito/cli/cli_commands/list_config.py +0 -0
  140. {janito-2.19.1 → janito-2.20.0}/janito/cli/cli_commands/list_drivers.py +0 -0
  141. {janito-2.19.1 → janito-2.20.0}/janito/cli/cli_commands/list_profiles.py +0 -0
  142. {janito-2.19.1 → janito-2.20.0}/janito/cli/cli_commands/list_providers.py +0 -0
  143. {janito-2.19.1 → janito-2.20.0}/janito/cli/cli_commands/list_providers_region.py +0 -0
  144. {janito-2.19.1 → janito-2.20.0}/janito/cli/cli_commands/list_tools.py +0 -0
  145. {janito-2.19.1 → janito-2.20.0}/janito/cli/cli_commands/model_selection.py +0 -0
  146. {janito-2.19.1 → janito-2.20.0}/janito/cli/cli_commands/model_utils.py +0 -0
  147. {janito-2.19.1 → janito-2.20.0}/janito/cli/cli_commands/ping_providers.py +0 -0
  148. {janito-2.19.1 → janito-2.20.0}/janito/cli/cli_commands/set_api_key.py +0 -0
  149. {janito-2.19.1 → janito-2.20.0}/janito/cli/cli_commands/show_config.py +0 -0
  150. {janito-2.19.1 → janito-2.20.0}/janito/cli/cli_commands/show_system_prompt.py +0 -0
  151. {janito-2.19.1 → janito-2.20.0}/janito/cli/config.py +0 -0
  152. {janito-2.19.1 → janito-2.20.0}/janito/cli/console.py +0 -0
  153. {janito-2.19.1 → janito-2.20.0}/janito/cli/core/__init__.py +0 -0
  154. {janito-2.19.1 → janito-2.20.0}/janito/cli/core/event_logger.py +0 -0
  155. {janito-2.19.1 → janito-2.20.0}/janito/cli/core/getters.py +0 -0
  156. {janito-2.19.1 → janito-2.20.0}/janito/cli/core/model_guesser.py +0 -0
  157. {janito-2.19.1 → janito-2.20.0}/janito/cli/core/runner.py +0 -0
  158. {janito-2.19.1 → janito-2.20.0}/janito/cli/core/setters.py +0 -0
  159. {janito-2.19.1 → janito-2.20.0}/janito/cli/core/unsetters.py +0 -0
  160. {janito-2.19.1 → janito-2.20.0}/janito/cli/main.py +0 -0
  161. {janito-2.19.1 → janito-2.20.0}/janito/cli/main_cli.py +0 -0
  162. {janito-2.19.1 → janito-2.20.0}/janito/cli/prompt_core.py +0 -0
  163. {janito-2.19.1 → janito-2.20.0}/janito/cli/prompt_handler.py +0 -0
  164. {janito-2.19.1 → janito-2.20.0}/janito/cli/prompt_setup.py +0 -0
  165. {janito-2.19.1 → janito-2.20.0}/janito/cli/rich_terminal_reporter.py +0 -0
  166. {janito-2.19.1 → janito-2.20.0}/janito/cli/single_shot_mode/__init__.py +0 -0
  167. {janito-2.19.1 → janito-2.20.0}/janito/cli/single_shot_mode/handler.py +0 -0
  168. {janito-2.19.1 → janito-2.20.0}/janito/cli/utils.py +0 -0
  169. {janito-2.19.1 → janito-2.20.0}/janito/cli/verbose_output.py +0 -0
  170. {janito-2.19.1 → janito-2.20.0}/janito/config.py +0 -0
  171. {janito-2.19.1 → janito-2.20.0}/janito/config_manager.py +0 -0
  172. {janito-2.19.1 → janito-2.20.0}/janito/conversation_history.py +0 -0
  173. {janito-2.19.1 → janito-2.20.0}/janito/dir_walk_utils.py +0 -0
  174. {janito-2.19.1 → janito-2.20.0}/janito/docs/GETTING_STARTED.md +0 -0
  175. {janito-2.19.1 → janito-2.20.0}/janito/driver_events.py +0 -0
  176. {janito-2.19.1 → janito-2.20.0}/janito/drivers/azure_openai/driver.py +0 -0
  177. {janito-2.19.1 → janito-2.20.0}/janito/drivers/cerebras/__init__.py +0 -0
  178. {janito-2.19.1 → janito-2.20.0}/janito/drivers/dashscope.bak.zip +0 -0
  179. {janito-2.19.1 → janito-2.20.0}/janito/drivers/openai/README.md +0 -0
  180. {janito-2.19.1 → janito-2.20.0}/janito/drivers/openai_responses.bak.zip +0 -0
  181. {janito-2.19.1 → janito-2.20.0}/janito/drivers/zai/__init__.py +0 -0
  182. {janito-2.19.1 → janito-2.20.0}/janito/drivers/zai/driver.py +0 -0
  183. {janito-2.19.1 → janito-2.20.0}/janito/event_bus/__init__.py +0 -0
  184. {janito-2.19.1 → janito-2.20.0}/janito/event_bus/bus.py +0 -0
  185. {janito-2.19.1 → janito-2.20.0}/janito/event_bus/event.py +0 -0
  186. {janito-2.19.1 → janito-2.20.0}/janito/event_bus/handler.py +0 -0
  187. {janito-2.19.1 → janito-2.20.0}/janito/event_bus/queue_bus.py +0 -0
  188. {janito-2.19.1 → janito-2.20.0}/janito/exceptions.py +0 -0
  189. {janito-2.19.1 → janito-2.20.0}/janito/formatting.py +0 -0
  190. {janito-2.19.1 → janito-2.20.0}/janito/formatting_token.py +0 -0
  191. {janito-2.19.1 → janito-2.20.0}/janito/gitignore_utils.py +0 -0
  192. {janito-2.19.1 → janito-2.20.0}/janito/i18n/__init__.py +0 -0
  193. {janito-2.19.1 → janito-2.20.0}/janito/i18n/it.py +0 -0
  194. {janito-2.19.1 → janito-2.20.0}/janito/i18n/messages.py +0 -0
  195. {janito-2.19.1 → janito-2.20.0}/janito/i18n/pt.py +0 -0
  196. {janito-2.19.1 → janito-2.20.0}/janito/llm/README.md +0 -0
  197. {janito-2.19.1 → janito-2.20.0}/janito/llm/__init__.py +0 -0
  198. {janito-2.19.1 → janito-2.20.0}/janito/llm/agent.py +0 -0
  199. {janito-2.19.1 → janito-2.20.0}/janito/llm/auth.py +0 -0
  200. {janito-2.19.1 → janito-2.20.0}/janito/llm/auth_utils.py +0 -0
  201. {janito-2.19.1 → janito-2.20.0}/janito/llm/driver.py +0 -0
  202. {janito-2.19.1 → janito-2.20.0}/janito/llm/driver_config.py +0 -0
  203. {janito-2.19.1 → janito-2.20.0}/janito/llm/driver_config_builder.py +0 -0
  204. {janito-2.19.1 → janito-2.20.0}/janito/llm/driver_input.py +0 -0
  205. {janito-2.19.1 → janito-2.20.0}/janito/llm/message_parts.py +0 -0
  206. {janito-2.19.1 → janito-2.20.0}/janito/llm/model.py +0 -0
  207. {janito-2.19.1 → janito-2.20.0}/janito/llm/provider.py +0 -0
  208. {janito-2.19.1 → janito-2.20.0}/janito/mkdocs.yml +0 -0
  209. {janito-2.19.1 → janito-2.20.0}/janito/perf_singleton.py +0 -0
  210. {janito-2.19.1 → janito-2.20.0}/janito/performance_collector.py +0 -0
  211. {janito-2.19.1 → janito-2.20.0}/janito/platform_discovery.py +0 -0
  212. {janito-2.19.1 → janito-2.20.0}/janito/provider_config.py +0 -0
  213. {janito-2.19.1 → janito-2.20.0}/janito/provider_registry.py +0 -0
  214. {janito-2.19.1 → janito-2.20.0}/janito/providers/alibaba/__init__.py +0 -0
  215. {janito-2.19.1 → janito-2.20.0}/janito/providers/alibaba/model_info.py +0 -0
  216. {janito-2.19.1 → janito-2.20.0}/janito/providers/alibaba/provider.py +0 -0
  217. {janito-2.19.1 → janito-2.20.0}/janito/providers/anthropic/model_info.py +0 -0
  218. {janito-2.19.1 → janito-2.20.0}/janito/providers/anthropic/provider.py +0 -0
  219. {janito-2.19.1 → janito-2.20.0}/janito/providers/azure_openai/model_info.py +0 -0
  220. {janito-2.19.1 → janito-2.20.0}/janito/providers/azure_openai/provider.py +0 -0
  221. {janito-2.19.1 → janito-2.20.0}/janito/providers/cerebras/__init__.py +0 -0
  222. {janito-2.19.1 → janito-2.20.0}/janito/providers/cerebras/model_info.py +0 -0
  223. {janito-2.19.1 → janito-2.20.0}/janito/providers/cerebras/provider.py +0 -0
  224. {janito-2.19.1 → janito-2.20.0}/janito/providers/dashscope.bak.zip +0 -0
  225. {janito-2.19.1 → janito-2.20.0}/janito/providers/deepseek/__init__.py +0 -0
  226. {janito-2.19.1 → janito-2.20.0}/janito/providers/deepseek/model_info.py +0 -0
  227. {janito-2.19.1 → janito-2.20.0}/janito/providers/deepseek/provider.py +0 -0
  228. {janito-2.19.1 → janito-2.20.0}/janito/providers/google/__init__.py +0 -0
  229. {janito-2.19.1 → janito-2.20.0}/janito/providers/google/model_info.py +0 -0
  230. {janito-2.19.1 → janito-2.20.0}/janito/providers/google/provider.py +0 -0
  231. {janito-2.19.1 → janito-2.20.0}/janito/providers/moonshotai/__init__.py +0 -0
  232. {janito-2.19.1 → janito-2.20.0}/janito/providers/moonshotai/model_info.py +0 -0
  233. {janito-2.19.1 → janito-2.20.0}/janito/providers/moonshotai/provider.py +0 -0
  234. {janito-2.19.1 → janito-2.20.0}/janito/providers/openai/__init__.py +0 -0
  235. {janito-2.19.1 → janito-2.20.0}/janito/providers/openai/model_info.py +0 -0
  236. {janito-2.19.1 → janito-2.20.0}/janito/providers/openai/provider.py +0 -0
  237. {janito-2.19.1 → janito-2.20.0}/janito/providers/openai/schema_generator.py +0 -0
  238. {janito-2.19.1 → janito-2.20.0}/janito/providers/registry.py +0 -0
  239. {janito-2.19.1 → janito-2.20.0}/janito/providers/zai/__init__.py +0 -0
  240. {janito-2.19.1 → janito-2.20.0}/janito/providers/zai/model_info.py +0 -0
  241. {janito-2.19.1 → janito-2.20.0}/janito/providers/zai/provider.py +0 -0
  242. {janito-2.19.1 → janito-2.20.0}/janito/providers/zai/schema_generator.py +0 -0
  243. {janito-2.19.1 → janito-2.20.0}/janito/regions/__init__.py +0 -0
  244. {janito-2.19.1 → janito-2.20.0}/janito/regions/cli.py +0 -0
  245. {janito-2.19.1 → janito-2.20.0}/janito/regions/geo_utils.py +0 -0
  246. {janito-2.19.1 → janito-2.20.0}/janito/regions/provider_regions.py +0 -0
  247. {janito-2.19.1 → janito-2.20.0}/janito/report_events.py +0 -0
  248. {janito-2.19.1 → janito-2.20.0}/janito/shell.bak.zip +0 -0
  249. {janito-2.19.1 → janito-2.20.0}/janito/tools/DOCSTRING_STANDARD.txt +0 -0
  250. {janito-2.19.1 → janito-2.20.0}/janito/tools/README.md +0 -0
  251. {janito-2.19.1 → janito-2.20.0}/janito/tools/__init__.py +0 -0
  252. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/__init__.py +0 -0
  253. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/__init__.py +0 -0
  254. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/adapter.py +0 -0
  255. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/ask_user.py +0 -0
  256. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/copy_file.py +0 -0
  257. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/create_directory.py +0 -0
  258. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/create_file.py +0 -0
  259. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/delete_text_in_file.py +0 -0
  260. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/fetch_url.py +0 -0
  261. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/find_files.py +0 -0
  262. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/get_file_outline/__init__.py +0 -0
  263. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/get_file_outline/core.py +0 -0
  264. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/get_file_outline/java_outline.py +0 -0
  265. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/get_file_outline/markdown_outline.py +0 -0
  266. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/get_file_outline/python_outline.py +0 -0
  267. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/get_file_outline/search_outline.py +0 -0
  268. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/move_file.py +0 -0
  269. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/open_html_in_browser.py +0 -0
  270. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/open_url.py +0 -0
  271. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/python_code_run.py +0 -0
  272. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/python_command_run.py +0 -0
  273. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/python_file_run.py +0 -0
  274. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/read_files.py +0 -0
  275. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/remove_directory.py +0 -0
  276. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/remove_file.py +0 -0
  277. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/replace_text_in_file.py +0 -0
  278. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/run_bash_command.py +0 -0
  279. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/run_powershell_command.py +0 -0
  280. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/search_text/__init__.py +0 -0
  281. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/search_text/core.py +0 -0
  282. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/search_text/match_lines.py +0 -0
  283. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/search_text/pattern_utils.py +0 -0
  284. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/search_text/traverse_directory.py +0 -0
  285. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/validate_file_syntax/__init__.py +0 -0
  286. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/validate_file_syntax/core.py +0 -0
  287. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/validate_file_syntax/css_validator.py +0 -0
  288. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/validate_file_syntax/html_validator.py +0 -0
  289. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/validate_file_syntax/js_validator.py +0 -0
  290. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/validate_file_syntax/json_validator.py +0 -0
  291. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/validate_file_syntax/markdown_validator.py +0 -0
  292. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/validate_file_syntax/ps1_validator.py +0 -0
  293. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/validate_file_syntax/python_validator.py +0 -0
  294. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/validate_file_syntax/xml_validator.py +0 -0
  295. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/validate_file_syntax/yaml_validator.py +0 -0
  296. {janito-2.19.1 → janito-2.20.0}/janito/tools/adapters/local/view_file.py +0 -0
  297. {janito-2.19.1 → janito-2.20.0}/janito/tools/disabled_tools.py +0 -0
  298. {janito-2.19.1 → janito-2.20.0}/janito/tools/inspect_registry.py +0 -0
  299. {janito-2.19.1 → janito-2.20.0}/janito/tools/outline_file.bak.zip +0 -0
  300. {janito-2.19.1 → janito-2.20.0}/janito/tools/path_security.py +0 -0
  301. {janito-2.19.1 → janito-2.20.0}/janito/tools/permissions.py +0 -0
  302. {janito-2.19.1 → janito-2.20.0}/janito/tools/permissions_parse.py +0 -0
  303. {janito-2.19.1 → janito-2.20.0}/janito/tools/tool_base.py +0 -0
  304. {janito-2.19.1 → janito-2.20.0}/janito/tools/tool_events.py +0 -0
  305. {janito-2.19.1 → janito-2.20.0}/janito/tools/tool_run_exception.py +0 -0
  306. {janito-2.19.1 → janito-2.20.0}/janito/tools/tool_use_tracker.py +0 -0
  307. {janito-2.19.1 → janito-2.20.0}/janito/tools/tool_utils.py +0 -0
  308. {janito-2.19.1 → janito-2.20.0}/janito/tools/tools_adapter.py +0 -0
  309. {janito-2.19.1 → janito-2.20.0}/janito/tools/tools_schema.py +0 -0
  310. {janito-2.19.1 → janito-2.20.0}/janito/utils.py +0 -0
  311. {janito-2.19.1 → janito-2.20.0}/janito.egg-info/dependency_links.txt +0 -0
  312. {janito-2.19.1 → janito-2.20.0}/janito.egg-info/entry_points.txt +0 -0
  313. {janito-2.19.1 → janito-2.20.0}/janito.egg-info/requires.txt +0 -0
  314. {janito-2.19.1 → janito-2.20.0}/janito.egg-info/top_level.txt +0 -0
  315. {janito-2.19.1 → janito-2.20.0}/mkdocs_hooks.py +0 -0
  316. {janito-2.19.1 → janito-2.20.0}/pyproject.toml +0 -0
  317. {janito-2.19.1 → janito-2.20.0}/pytest.ini +0 -0
  318. {janito-2.19.1 → janito-2.20.0}/requirements-dev.txt +0 -0
  319. {janito-2.19.1 → janito-2.20.0}/requirements.txt +0 -0
  320. {janito-2.19.1 → janito-2.20.0}/setup.cfg +0 -0
  321. {janito-2.19.1 → janito-2.20.0}/tests/adapters/local/get_file_outline/test_core_outline.py +0 -0
  322. {janito-2.19.1 → janito-2.20.0}/tests/adapters/local/test_read_files.py +0 -0
  323. {janito-2.19.1 → janito-2.20.0}/tests/test_cli_list_models.py +0 -0
  324. {janito-2.19.1 → janito-2.20.0}/tests/test_cli_list_providers.py +0 -0
  325. {janito-2.19.1 → janito-2.20.0}/tests/test_cli_list_providers_alibaba.py +0 -0
  326. {janito-2.19.1 → janito-2.20.0}/tests/test_cli_list_providers_moonshotai.py +0 -0
  327. {janito-2.19.1 → janito-2.20.0}/tests/test_cli_version.py +0 -0
  328. {janito-2.19.1 → janito-2.20.0}/tests/test_disabled_tools.py +0 -0
  329. {janito-2.19.1 → janito-2.20.0}/tests/test_provider_alibaba.py +0 -0
  330. {janito-2.19.1 → janito-2.20.0}/tests/test_provider_cerebras.py +0 -0
  331. {janito-2.19.1 → janito-2.20.0}/tests/test_provider_moonshotai.py +0 -0
  332. {janito-2.19.1 → janito-2.20.0}/tools/release.py +0 -0
  333. {janito-2.19.1 → janito-2.20.0}/tox.ini +0 -0
@@ -2,6 +2,25 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [2.20.0] - 2025-08-10
6
+
7
+ ### Added
8
+
9
+ - **Mistral AI Provider**: Added complete support for Mistral AI models
10
+ - **General Purpose Models**:
11
+ - `mistral-large-latest`: 128k context, most capable model (default)
12
+ - `mistral-medium-latest`: 32k context, balanced performance
13
+ - `mistral-small-latest`: 32k context, compact and efficient
14
+ - **Code-Focused Models**:
15
+ - `codestral-latest`: 256k context, specialized for code generation
16
+ - `codestral-2405`: Previous version of code-focused model
17
+ - **Development-Focused Models**:
18
+ - `devstral-small-latest`: 128k context, optimized for agentic tool use
19
+ - `devstral-medium-latest`: 128k context, enhanced agentic capabilities
20
+ - **Mistral Setup Guide**: Comprehensive documentation for Mistral AI integration
21
+ - **Tool Support**: Full tool/function calling support across all Mistral models
22
+ - **API Integration**: Uses OpenAI-compatible API format via Mistral's La Plateforme
23
+
5
24
  ## [2.19.0] - 2025-08-08
6
25
 
7
26
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: janito
3
- Version: 2.19.1
3
+ Version: 2.20.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
@@ -39,6 +39,7 @@ Janito supports multiple AI providers:
39
39
  - [OpenAI](openai-setup.md)
40
40
  - [DeepSeek](deepseek-setup.md)
41
41
  - [MoonshotAI](moonshotai-setup.md)
42
+ - [Mistral](mistral-setup.md)
42
43
  - [Z.ai](z-ai-setup.md)
43
44
  - [Cerebras](cerebras-setup.md)
44
45
 
@@ -0,0 +1,180 @@
1
+ # Mistral Setup Guide
2
+
3
+ This guide walks you through setting up Mistral AI models with Janito.
4
+
5
+ ## Overview
6
+
7
+ Mistral AI provides a comprehensive suite of models including:
8
+ - **General-purpose models**: Mistral Small, Medium, and Large
9
+ - **Code-focused models**: Codestral for code generation and completion
10
+ - **Development-focused models**: Devstral for agentic software development
11
+
12
+ ## Prerequisites
13
+
14
+ 1. **Python 3.8+** installed
15
+ 2. **Janito** installed (`pip install janito`)
16
+ 3. **Mistral API Key** from [La Plateforme](https://console.mistral.ai/)
17
+
18
+ ## Quick Setup
19
+
20
+ ### 1. Get Your API Key
21
+
22
+ 1. Visit [Mistral AI La Plateforme](https://console.mistral.ai/)
23
+ 2. Sign up or log in to your account
24
+ 3. Navigate to **API Keys** section
25
+ 4. Create a new API key
26
+ 5. Copy the key for use in Janito
27
+
28
+ ### 2. Configure Janito
29
+
30
+ Set your Mistral API key using one of these methods:
31
+
32
+ #### Method 1: Environment Variable (Recommended)
33
+
34
+ ```bash
35
+ # Linux/macOS
36
+ export MISTRAL_API_KEY="your-api-key-here"
37
+
38
+ # Windows (PowerShell)
39
+ $env:MISTRAL_API_KEY="your-api-key-here"
40
+
41
+ # Windows (Command Prompt)
42
+ set MISTRAL_API_KEY=your-api-key-here
43
+ ```
44
+
45
+ #### Method 2: Janito CLI
46
+
47
+ ```bash
48
+ janito set-api-key mistral your-api-key-here
49
+ ```
50
+
51
+ #### Method 3: Interactive Setup
52
+
53
+ ```bash
54
+ janito chat
55
+ # Then use the !model command to select mistral and follow prompts
56
+ ```
57
+
58
+ ## Available Models
59
+
60
+ ### General Purpose Models
61
+ - **mistral-large-latest** (default) - Most capable with 128k context
62
+ - **mistral-medium-latest** - Balanced performance with 32k context
63
+ - **mistral-small-latest** - Compact and efficient with 32k context
64
+
65
+ ### Code-Focused Models
66
+ - **codestral-latest** - Specialized for code generation with 256k context
67
+ - **codestral-2405** - Previous version of code-focused model
68
+
69
+ ### Development-Focused Models
70
+ - **devstral-small-latest** - Optimized for agentic tool use
71
+ - **devstral-medium-latest** - Enhanced agentic capabilities
72
+
73
+ ## Usage Examples
74
+
75
+ ### Basic Chat
76
+
77
+ ```bash
78
+ # Start chat with default model (mistral-large-latest)
79
+ janito chat --provider mistral
80
+
81
+ # Use specific model
82
+ janito chat --provider mistral --model codestral-latest
83
+ ```
84
+
85
+ ### Single-Shot Mode
86
+
87
+ ```bash
88
+ # Quick question
89
+ janito "Explain quantum computing" --provider mistral
90
+
91
+ # Code generation
92
+ janito "Write a Python function for fibonacci" --provider mistral --model codestral-latest
93
+ ```
94
+
95
+ ### Configuration File
96
+
97
+ You can also configure Mistral in your Janito configuration:
98
+
99
+ ```yaml
100
+ # ~/.janito/config.yaml
101
+ providers:
102
+ mistral:
103
+ api_key: "your-api-key-here"
104
+ model: "mistral-large-latest"
105
+ ```
106
+
107
+ ## Model Selection Tips
108
+
109
+ - **General conversations**: Use `mistral-large-latest` for best results
110
+ - **Code generation**: Use `codestral-latest` for programming tasks
111
+ - **Development workflows**: Use `devstral-*` models for agentic development
112
+ - **Cost optimization**: Use `mistral-small-latest` for simpler tasks
113
+
114
+ ## Troubleshooting
115
+
116
+ ### Common Issues
117
+
118
+ 1. **"Invalid API key" error**
119
+ - Verify your API key is correct
120
+ - Check if the key has proper permissions
121
+ - Ensure no extra spaces in the key
122
+
123
+ 2. **"Model not found" error**
124
+ - Check available models with: `janito list-models --provider mistral`
125
+ - Ensure you're using the exact model name
126
+
127
+ 3. **Rate limiting**
128
+ - Mistral has rate limits based on your plan
129
+ - Consider upgrading your plan or implementing retry logic
130
+
131
+ ### Debug Mode
132
+
133
+ Enable debug logging to see API requests:
134
+
135
+ ```bash
136
+ # Enable HTTP debug for Mistral
137
+ export MISTRAL_DEBUG_HTTP=1
138
+ janito chat --provider mistral --verbose-api
139
+ ```
140
+
141
+ ### Testing Connection
142
+
143
+ Test your setup:
144
+
145
+ ```bash
146
+ # Ping the provider
147
+ janito ping-providers
148
+
149
+ # List available models
150
+ janito list-models --provider mistral
151
+
152
+ # Test with a simple query
153
+ janito "Hello, Mistral!" --provider mistral
154
+ ```
155
+
156
+ ## Advanced Configuration
157
+
158
+ ### Custom Base URL
159
+
160
+ If you need to use a different endpoint (e.g., for enterprise deployments):
161
+
162
+ ```bash
163
+ janito set-config mistral.base_url "https://your-custom-endpoint.com/v1"
164
+ ```
165
+
166
+ ### Model Parameters
167
+
168
+ You can set default parameters for Mistral models:
169
+
170
+ ```bash
171
+ janito set-config mistral.temperature 0.5
172
+ janito set-config mistral.max_tokens 2000
173
+ ```
174
+
175
+ ## Support
176
+
177
+ For additional help:
178
+ - Check the [Mistral AI documentation](https://docs.mistral.ai/)
179
+ - Review [Janito troubleshooting guides](guides/configuration.md)
180
+ - Join our [Discord community](https://discord.gg/janito)
@@ -0,0 +1,26 @@
1
+ # Provider Platform and Documentation Access
2
+
3
+ This table shows the accessibility status of each provider's platform/dashboard and API documentation.
4
+
5
+ | Provider | Platform Access | Documentation | API Docs | Status |
6
+ |----------|-----------------|---------------|----------|--------|
7
+ | **Alibaba** | [Alibaba Cloud Console](https://account.alibabacloud.com) | [Model Studio Help](https://www.alibabacloud.com/help/en/model-studio) | [API Reference](https://www.alibabacloud.com/help/en/model-studio/api-reference) | ✅ Full Access |
8
+ | **Anthropic** | [Console](https://console.anthropic.com) | [API Docs](https://docs.anthropic.com/en/api/getting-started) | [API Reference](https://docs.anthropic.com/en/api/messages) | ⚠️ Console Blocked |
9
+ | **Cerebras** | [API Dashboard](https://api.cerebras.ai) | [Inference Docs](https://cerebras.ai/inference) | [API Docs](https://cerebras.ai/inference) | ✅ Full Access |
10
+ | **DeepSeek** | [Platform](https://platform.deepseek.com) | [API Docs](https://platform.deepseek.com/api-docs) | [API Reference](https://platform.deepseek.com/api-docs) | ❌ All Blocked |
11
+ | **Google** | [AI Studio](https://aistudio.google.com) | [Gemini API Docs](https://ai.google.dev/gemini-api/docs) | [API Reference](https://ai.google.dev/gemini-api/docs) | ✅ Full Access |
12
+ | **MoonshotAI** | [Platform](https://platform.moonshot.ai) | [API Docs](https://platform.moonshot.ai/docs) | [API Reference](https://platform.moonshot.ai/docs) | ✅ Full Access |
13
+ | **OpenAI** | [Platform](https://platform.openai.com) | [API Docs](https://platform.openai.com/docs) | [API Reference](https://platform.openai.com/docs/api-reference) | ❌ All Blocked |
14
+ | **Z.ai** | [API Management](https://z.ai/manage-apikey/apikey-list) | [Model API Docs](https://z.ai/model-api) | [API Reference](https://z.ai/model-api) | ✅ Full Access |
15
+
16
+ ## Status Legend
17
+
18
+ - ✅ **Full Access**: Both platform and documentation are publicly accessible
19
+ - ⚠️ **Partial Access**: Documentation available but platform/dashboard blocked
20
+ - ❌ **Blocked**: Both platform and documentation are inaccessible (403 errors)
21
+
22
+ ## Notes
23
+
24
+ - **API Endpoints**: All API base URLs return 404 when accessed directly without authentication (expected behavior)
25
+ - **Authentication**: All providers require valid API keys for actual API usage
26
+ - **Regional Restrictions**: Some providers may have additional access restrictions based on geographic location
@@ -2,6 +2,8 @@
2
2
 
3
3
  This page lists the supported providers and their available models, organized by openness and sorted alphabetically within each category.
4
4
 
5
+ > 📋 **Platform & Documentation Access**: For information about which providers have publicly accessible platforms and documentation vs. blocked access, see [Platform & Documentation Access](provider-platform-access.md).
6
+
5
7
  ## Open-Source / Open-Weight Models
6
8
 
7
9
  ### Alibaba
@@ -40,6 +42,20 @@ This page lists the supported providers and their available models, organized by
40
42
  - **DeepSeek Chat** (default) - General purpose chat model
41
43
  - **DeepSeek Reasoner** - Specialized for complex reasoning tasks
42
44
 
45
+ ### Mistral
46
+
47
+ - **Mistral Large Latest** (default) - Most capable Mistral model with 128k context
48
+ - **Mistral Medium Latest** - Balanced performance with 32k context
49
+ - **Mistral Small Latest** - Compact and efficient with 32k context
50
+ - **Codestral Latest** - Specialized for code generation with 256k context
51
+ - **Codestral 2405** - Previous version of code-focused model
52
+ - **Devstral Small Latest** - Optimized for agentic tool use in software development
53
+ - **Devstral Medium Latest** - Enhanced agentic capabilities for development tasks
54
+
55
+ Mistral provides both general-purpose and specialized models, with Codestral specifically designed for code generation and Devstral for agentic software development.
56
+
57
+ For setup instructions, see the [Mistral Setup Guide](mistral-setup.md).
58
+
43
59
  ### MoonshotAI
44
60
 
45
61
  - **Kimi K2 Turbo Preview** (default) - Latest generation with enhanced performance
@@ -2,8 +2,8 @@
2
2
  CLI Command: List models for the specified/current provider
3
3
  """
4
4
 
5
- from janito.cli.cli_commands.model_utils import _print_models_table
6
5
  import sys
6
+ from janito.cli.cli_commands.model_utils import _print_models_table
7
7
 
8
8
  _provider_instance = None
9
9
 
@@ -36,8 +36,6 @@ def handle_list_models(args, provider_instance):
36
36
 
37
37
  for m in models:
38
38
  table.add_row(str(m))
39
-
40
- import sys
41
39
  if sys.stdout.isatty():
42
40
  shared_console.print(table)
43
41
  else:
@@ -64,14 +64,20 @@ class OpenAIModelDriver(LLMDriver):
64
64
  if config.model:
65
65
  api_kwargs["model"] = config.model
66
66
  # Prefer max_completion_tokens if present, else fallback to max_tokens (for backward compatibility)
67
- if (
68
- hasattr(config, "max_completion_tokens")
69
- and config.max_completion_tokens is not None
70
- ):
71
- api_kwargs["max_completion_tokens"] = int(config.max_completion_tokens)
67
+ # Skip max_completion_tokens for Mistral as their API doesn't support it
68
+ is_mistral = config.base_url and "mistral.ai" in str(config.base_url)
69
+ if not is_mistral:
70
+ if (
71
+ hasattr(config, "max_completion_tokens")
72
+ and config.max_completion_tokens is not None
73
+ ):
74
+ api_kwargs["max_completion_tokens"] = int(config.max_completion_tokens)
75
+ elif hasattr(config, "max_tokens") and config.max_tokens is not None:
76
+ # For models that do not support 'max_tokens', map to 'max_completion_tokens'
77
+ api_kwargs["max_completion_tokens"] = int(config.max_tokens)
72
78
  elif hasattr(config, "max_tokens") and config.max_tokens is not None:
73
- # For models that do not support 'max_tokens', map to 'max_completion_tokens'
74
- api_kwargs["max_completion_tokens"] = int(config.max_tokens)
79
+ # For Mistral, use max_tokens directly
80
+ api_kwargs["max_tokens"] = int(config.max_tokens)
75
81
  for p in (
76
82
  "temperature",
77
83
  "top_p",
@@ -8,3 +8,4 @@ import janito.providers.moonshotai.provider
8
8
  import janito.providers.alibaba.provider
9
9
  import janito.providers.zai.provider
10
10
  import janito.providers.cerebras.provider
11
+ import janito.providers.mistral.provider
@@ -0,0 +1 @@
1
+ # Codestral provider module
@@ -0,0 +1,81 @@
1
+ from janito.llm.model import LLMModelInfo
2
+
3
+ MODEL_SPECS = {
4
+ "codestral-latest": LLMModelInfo(
5
+ name="codestral-latest",
6
+ context=256000,
7
+ max_input=250000,
8
+ max_cot="N/A",
9
+ max_response=4096,
10
+ thinking_supported=False,
11
+ default_temp=0.2,
12
+ open="mistral",
13
+ driver="OpenAIModelDriver",
14
+ ),
15
+ "codestral-2405": LLMModelInfo(
16
+ name="codestral-2405",
17
+ context=256000,
18
+ max_input=250000,
19
+ max_cot="N/A",
20
+ max_response=4096,
21
+ thinking_supported=False,
22
+ default_temp=0.2,
23
+ open="mistral",
24
+ driver="OpenAIModelDriver",
25
+ ),
26
+ "mistral-small-latest": LLMModelInfo(
27
+ name="mistral-small-latest",
28
+ context=32000,
29
+ max_input=28000,
30
+ max_cot="N/A",
31
+ max_response=4096,
32
+ thinking_supported=False,
33
+ default_temp=0.7,
34
+ open="mistral",
35
+ driver="OpenAIModelDriver",
36
+ ),
37
+ "mistral-medium-latest": LLMModelInfo(
38
+ name="mistral-medium-latest",
39
+ context=32000,
40
+ max_input=28000,
41
+ max_cot="N/A",
42
+ max_response=4096,
43
+ thinking_supported=False,
44
+ default_temp=0.7,
45
+ open="mistral",
46
+ driver="OpenAIModelDriver",
47
+ ),
48
+ "mistral-large-latest": LLMModelInfo(
49
+ name="mistral-large-latest",
50
+ context=128000,
51
+ max_input=120000,
52
+ max_cot="N/A",
53
+ max_response=4096,
54
+ thinking_supported=False,
55
+ default_temp=0.7,
56
+ open="mistral",
57
+ driver="OpenAIModelDriver",
58
+ ),
59
+ "devstral-small-latest": LLMModelInfo(
60
+ name="devstral-small-latest",
61
+ context=128000,
62
+ max_input=120000,
63
+ max_cot="N/A",
64
+ max_response=4096,
65
+ thinking_supported=False,
66
+ default_temp=0.7,
67
+ open="mistral",
68
+ driver="OpenAIModelDriver",
69
+ ),
70
+ "devstral-medium-latest": LLMModelInfo(
71
+ name="devstral-medium-latest",
72
+ context=128000,
73
+ max_input=120000,
74
+ max_cot="N/A",
75
+ max_response=4096,
76
+ thinking_supported=False,
77
+ default_temp=0.7,
78
+ open="mistral",
79
+ driver="OpenAIModelDriver",
80
+ ),
81
+ }
@@ -0,0 +1,124 @@
1
+ from janito.llm.provider import LLMProvider
2
+ from janito.llm.model import LLMModelInfo
3
+ from janito.llm.auth import LLMAuthManager
4
+ from janito.llm.driver_config import LLMDriverConfig
5
+ from janito.drivers.openai.driver import OpenAIModelDriver
6
+ from janito.tools import get_local_tools_adapter
7
+ from janito.providers.registry import LLMProviderRegistry
8
+ from .model_info import MODEL_SPECS
9
+
10
+ available = OpenAIModelDriver.available
11
+ unavailable_reason = OpenAIModelDriver.unavailable_reason
12
+
13
+
14
+ class MistralProvider(LLMProvider):
15
+ name = "mistral"
16
+ NAME = "mistral"
17
+ MAINTAINER = "João Pinto <janito@ikignosis.org>"
18
+ MODEL_SPECS = MODEL_SPECS
19
+ DEFAULT_MODEL = "mistral-large-latest"
20
+
21
+ def __init__(
22
+ self, auth_manager: LLMAuthManager = None, config: LLMDriverConfig = None
23
+ ):
24
+ self._tools_adapter = get_local_tools_adapter()
25
+ self._driver = None
26
+
27
+ if not self.available:
28
+ return
29
+
30
+ self._initialize_config(auth_manager, config)
31
+ self._setup_model_config()
32
+
33
+ def _initialize_config(self, auth_manager, config):
34
+ """Initialize configuration and API key."""
35
+ self.auth_manager = auth_manager or LLMAuthManager()
36
+ self._api_key = self.auth_manager.get_credentials(type(self).NAME)
37
+ if not self._api_key:
38
+ from janito.llm.auth_utils import handle_missing_api_key
39
+
40
+ handle_missing_api_key(self.name, "MISTRAL_API_KEY")
41
+
42
+ self._driver_config = config or LLMDriverConfig(model=None)
43
+ if not self._driver_config.model:
44
+ self._driver_config.model = self.DEFAULT_MODEL
45
+ if not self._driver_config.api_key:
46
+ self._driver_config.api_key = self._api_key
47
+
48
+ # Set Mistral-specific base URL
49
+ self._driver_config.base_url = "https://api.mistral.ai/v1"
50
+
51
+ def _setup_model_config(self):
52
+ """Configure token limits based on model specifications."""
53
+ model_name = self._driver_config.model
54
+ model_spec = self.MODEL_SPECS.get(model_name)
55
+
56
+ # Reset token parameters
57
+ if hasattr(self._driver_config, "max_tokens"):
58
+ self._driver_config.max_tokens = None
59
+ if hasattr(self._driver_config, "max_completion_tokens"):
60
+ self._driver_config.max_completion_tokens = None
61
+
62
+ if model_spec:
63
+ if getattr(model_spec, "thinking_supported", False):
64
+ max_cot = getattr(model_spec, "max_cot", None)
65
+ if max_cot and max_cot != "N/A":
66
+ self._driver_config.max_tokens = int(max_cot)
67
+ else:
68
+ max_response = getattr(model_spec, "max_response", None)
69
+ if max_response and max_response != "N/A":
70
+ self._driver_config.max_tokens = int(max_response)
71
+
72
+ self.fill_missing_device_info(self._driver_config)
73
+
74
+ @property
75
+ def driver(self) -> OpenAIModelDriver:
76
+ if not self.available:
77
+ raise ImportError(f"MistralProvider unavailable: {self.unavailable_reason}")
78
+ return self._driver
79
+
80
+ @property
81
+ def available(self):
82
+ return available
83
+
84
+ @property
85
+ def unavailable_reason(self):
86
+ return unavailable_reason
87
+
88
+ def create_driver(self):
89
+ """
90
+ Creates and returns a new OpenAIModelDriver instance with input/output queues.
91
+ """
92
+ driver = OpenAIModelDriver(
93
+ tools_adapter=self._tools_adapter, provider_name=self.NAME
94
+ )
95
+ driver.config = self._driver_config
96
+ # NOTE: The caller is responsible for calling driver.start() if background processing is needed.
97
+ return driver
98
+
99
+ def create_agent(self, tools_adapter=None, agent_name: str = None, **kwargs):
100
+ from janito.llm.agent import LLMAgent
101
+
102
+ # Always create a new driver with the passed-in tools_adapter
103
+ if tools_adapter is None:
104
+ tools_adapter = get_local_tools_adapter()
105
+ # Should use new-style driver construction via queues/factory (handled elsewhere)
106
+ raise NotImplementedError(
107
+ "create_agent must be constructed via new factory using input/output queues and config."
108
+ )
109
+
110
+ @property
111
+ def model_name(self):
112
+ return self._driver_config.model
113
+
114
+ @property
115
+ def driver_config(self):
116
+ """Public, read-only access to the provider's LLMDriverConfig object."""
117
+ return self._driver_config
118
+
119
+ def execute_tool(self, tool_name: str, event_bus, *args, **kwargs):
120
+ self._tools_adapter.event_bus = event_bus
121
+ return self._tools_adapter.execute_by_name(tool_name, *args, **kwargs)
122
+
123
+
124
+ LLMProviderRegistry.register(MistralProvider.NAME, MistralProvider)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: janito
3
- Version: 2.19.1
3
+ Version: 2.20.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
@@ -35,8 +35,10 @@ docs/event-bus.md
35
35
  docs/index.md
36
36
  docs/llm-drivers-required-config.md
37
37
  docs/llm-drivers.md
38
+ docs/mistral-setup.md
38
39
  docs/moonshotai-setup.md
39
40
  docs/openai-setup.md
41
+ docs/provider-platform-access.md
40
42
  docs/security.md
41
43
  docs/supported-providers-models.md
42
44
  docs/tools-index.md
@@ -236,6 +238,9 @@ janito/providers/deepseek/provider.py
236
238
  janito/providers/google/__init__.py
237
239
  janito/providers/google/model_info.py
238
240
  janito/providers/google/provider.py
241
+ janito/providers/mistral/__init__.py
242
+ janito/providers/mistral/model_info.py
243
+ janito/providers/mistral/provider.py
239
244
  janito/providers/moonshotai/__init__.py
240
245
  janito/providers/moonshotai/model_info.py
241
246
  janito/providers/moonshotai/provider.py
@@ -35,6 +35,7 @@ nav:
35
35
  - API Reference: reference/api.md
36
36
  - Supported Providers & Models:
37
37
  - Overview: supported-providers-models.md
38
+ - Platform & Documentation Access: provider-platform-access.md
38
39
  - OpenAI Setup: openai-setup.md
39
40
  - DeepSeek Setup: deepseek-setup.md
40
41
  - MoonshotAI Setup: moonshotai-setup.md
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