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
6c3faafe
Unverified
Commit
6c3faafe
authored
Jan 05, 2026
by
Devon Rifkin
Committed by
GitHub
Jan 05, 2026
Browse files
olmo3: fix flaky test (#13629)
I introduced this in <
https://github.com/ollama/ollama/pull/13525
>
parent
e51dead6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
model/renderers/olmo3_test.go
model/renderers/olmo3_test.go
+6
-6
model/renderers/testhelpers_test.go
model/renderers/testhelpers_test.go
+15
-0
No files found.
model/renderers/olmo3_test.go
View file @
6c3faafe
...
...
@@ -227,9 +227,9 @@ func TestOlmo3Renderer(t *testing.T) {
ID
:
"call_1"
,
Function
:
api
.
ToolCallFunction
{
Name
:
"book_flight"
,
Arguments
:
testArgs
(
map
[
string
]
any
{
"from"
:
"SFO"
,
"to"
:
"NYC"
,
Arguments
:
testArgs
Ordered
([]
orderedArg
{
{
"from"
,
"SFO"
}
,
{
"to"
,
"NYC"
}
,
}),
},
},
...
...
@@ -243,9 +243,9 @@ func TestOlmo3Renderer(t *testing.T) {
Name
:
"book_flight"
,
Parameters
:
api
.
ToolFunctionParameters
{
Type
:
"object"
,
Properties
:
testProps
Map
(
map
[
string
]
api
.
ToolProperty
{
"from"
:
{
Type
:
api
.
PropertyType
{
"string"
}},
"to"
:
{
Type
:
api
.
PropertyType
{
"string"
}},
Properties
:
testProps
Ordered
([]
orderedProp
{
{
"from"
,
api
.
ToolProperty
{
Type
:
api
.
PropertyType
{
"string"
}}
}
,
{
"to"
,
api
.
ToolProperty
{
Type
:
api
.
PropertyType
{
"string"
}}
}
,
}),
},
},
...
...
model/renderers/testhelpers_test.go
View file @
6c3faafe
...
...
@@ -34,3 +34,18 @@ func testArgsOrdered(pairs []orderedArg) api.ToolCallFunctionArguments {
}
return
args
}
// orderedProp represents a key-value pair for ordered property creation
type
orderedProp
struct
{
Key
string
Value
api
.
ToolProperty
}
// testPropsOrdered creates a ToolPropertiesMap with a specific key order
func
testPropsOrdered
(
pairs
[]
orderedProp
)
*
api
.
ToolPropertiesMap
{
props
:=
api
.
NewToolPropertiesMap
()
for
_
,
p
:=
range
pairs
{
props
.
Set
(
p
.
Key
,
p
.
Value
)
}
return
props
}
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