bamaer opened a new issue, #8835:
URL: https://github.com/apache/hop/issues/8835

   ### What would you like to happen?
   
   ### Problem
   
   Thinking models on Ollama (qwen3, qwen3.5, deepseek-r1, gpt-oss, …) reason 
before they answer by default, and an AI provider has no way to switch that off.
   
   For transforms that call the model once per row, this dominates the run 
time. On a 35B MoE model (qwen3.5, Apple M3 Max), one Extract graph call on a 
two-sentence chunk takes:
   
   | Thinking | Output tokens | Time |
   |---|---|---|
   | on (default) | ~6,000 | ~90 s |
   | off (`"think": false`) | ~140 | ~2 s |
   
   Adding `/no_think` to the prompt is not a reliable workaround: it roughly 
halves the reasoning, and not every model honours it.
   
   ### Proposal
   
   Add a **Thinking** option to the AI provider's Model settings, next to 
Context size and Max output tokens:
   
   - **Default:** leave it to the model (today's behaviour, and the value for 
existing providers)
   - **Off:** `think(false)`
   - **On:** `think(true)`
   
   Also set `returnThinking(false)`, so reasoning text never ends up in output 
fields. The value can be a variable, like the other provider fields.
   
   The bundled langchain4j-ollama (1.20) already supports both builder methods, 
so no dependency change is needed.
   
   ### Where it applies
   
   The provider reaches the chat model in two ways, and both need the option:
   
   1. `AiChatModelFactory.ollamaModel()`: used by Extract graph, Structured 
extract and the AI Assistant.
   2. `AiChatFactory` copies the provider's settings into 
`LanguageModelChatMeta`, and `LanguageModelFacade` builds the model: used by 
Language Model Chat. That needs a matching `ollamaThink` field.
   
   Embedding models are not affected.
   
   ### Scope
   
   - Ollama only for now. The option is generic on purpose: OpenAI (reasoning 
effort), Anthropic (extended thinking) and Mistral (reasoning models) can map 
onto it later. Until then it is ignored for those types and the editor says so 
in the tooltip.
   - Unit tests for both paths: the option reaches the builder; Default sets 
nothing.
   - Docs: the AI provider metadata page.
   
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: Metadata


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to