Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
31361c4d
Unverified
Commit
31361c4d
authored
Nov 11, 2025
by
Eva H
Committed by
GitHub
Nov 11, 2025
Browse files
app/ui: do not send thinking to prevent errors with cloud provider
parents
59241c5b
2a9b61f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
app/ui/app/src/api.ts
app/ui/app/src/api.ts
+8
-1
app/ui/ui.go
app/ui/ui.go
+5
-4
No files found.
app/ui/app/src/api.ts
View file @
31361c4d
...
...
@@ -205,6 +205,13 @@ export async function* sendMessage(
data
:
uint8ArrayToBase64
(
att
.
data
),
}));
// Only send think parameter when actually requesting thinking
// Don't send false as it causes issues with some providers
const
shouldSendThink
=
think
!==
undefined
&&
((
typeof
think
===
"
boolean
"
&&
think
)
||
(
typeof
think
===
"
string
"
&&
think
!==
""
));
const
response
=
await
fetch
(
`
${
API_BASE
}
/api/v1/chat/
${
chatId
}
`
,
{
method
:
"
POST
"
,
headers
:
{
...
...
@@ -222,7 +229,7 @@ export async function* sendMessage(
web_search
:
webSearch
??
false
,
file_tools
:
fileTools
??
false
,
...(
forceUpdate
!==
undefined
?
{
forceUpdate
}
:
{}),
...(
think
!==
undefined
?
{
think
}
:
{}),
...(
shouldSendThink
?
{
think
}
:
{}),
}),
),
signal
,
...
...
app/ui/ui.go
View file @
31361c4d
...
...
@@ -1794,13 +1794,14 @@ func (s *Server) buildChatRequest(chat *store.Chat, model string, think any, ava
var
thinkValue
*
api
.
ThinkValue
if
think
!=
nil
{
// Only set Think if it's actually requesting thinking
if
boolValue
,
ok
:=
think
.
(
bool
);
ok
{
thinkValue
=
&
api
.
ThinkValue
{
Value
:
boolValue
,
if
boolValue
{
thinkValue
=
&
api
.
ThinkValue
{
Value
:
boolValue
}
}
}
else
if
stringValue
,
ok
:=
think
.
(
string
);
ok
{
th
in
k
Value
=
&
api
.
Th
in
k
Value
{
Value
:
stringValue
,
if
str
in
g
Value
!
=
""
&&
str
in
g
Value
!=
"none"
{
thinkValue
=
&
api
.
ThinkValue
{
Value
:
stringValue
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment