small gleam coding and persistent agent daemon with a detachable cli and a canvas ui albedo.sh

python tool schema is rejected by opencode-go/beam-free: 'required' must list every property #174

Open aly.codes
Open opened by aly.codes

opencode-go/beam-free cannot run at all: every request fails with a 400 from the provider about the python tool's JSON schema. The python extension sends "required": ["code"] while properties also has timeout_ms, and this upstream demands required list every property.

Reproduce #

albedo -p 'Say "ok".' -m opencode-go/beam-free

Exit 1, no tool call, no reply:

OpenCode Go error (400): Upstream request failed: [invalid_function_parameters]
Invalid schema for function 'python': In context=(), 'required' is required to be
supplied and to be an array including every key in properties. Missing 'timeout_ms'

The same prompt on opencode-go/glm-5.3-flash succeeds, and the session on deepseek-v4.1-flash works, so it is model-specific rather than profile-wide.

Where #

src/albedo/harness/extensions/python/extension.gleam (definition/0):

#("required", json.array(["code"], json.string)),
#("properties", json.object([
  #("code", json.object([#("type", json.string("string"))])),
  #("timeout_ms", json.object([...])),
])),

The upstream body, from provider_requests (param: tools[0].function.parameters, status 400, profile opencode-go, model beam-free, two attempts):

{"error":{"param":"tools[0].function.parameters","type":"invalid_request_error",
"message":"Upstream request failed: [invalid_function_parameters] ... Missing 'timeout_ms'."}}

What it costs #

Anything that creates a session on such a model dies on its first request: albedo -p (a detached writer, for one), a child spawned with agents.self.spawn(model=...), or a session picked in the model list. The failure is total, so the model is offered but unusable.

Options #

  • Mark timeout_ms required and let the argument decode default it (this session's decoders already treat it as optional), since the value has a documented default of 300000.
  • Or drop timeout_ms from properties for providers that reject it.
  • Or keep the schema and stop offering a model the provider's validator refuses, so the model list cannot hand you one that fails every request.
Sign up or Sign in to add to the discussion.