What happened?
options.maxTokens in pi-ai is silently ignored for opencode-go provider. The API accepts max_tokens but pi-ai sends max_completion_tokens, which the backend ignores.
Steps to reproduce
Send streamSimple(model, ctx, { maxTokens: 1 }) for any opencode-go model -- output is not truncated.
Expected behavior
maxTokens maps to "max_tokens", not "max_completion_tokens"
Version
0.78.0
What happened?
options.maxTokens in pi-ai is silently ignored for opencode-go provider. The API accepts max_tokens but pi-ai sends max_completion_tokens, which the backend ignores.
Steps to reproduce
Send streamSimple(model, ctx, { maxTokens: 1 }) for any opencode-go model -- output is not truncated.
Expected behavior
maxTokens maps to "max_tokens", not "max_completion_tokens"
Version
0.78.0