Hey there!
Not sure if this is the right place to report this, but I’ve noticed a strange quirk with nemotron ultra, specifically when writing files in applications like Opencode
Without fail, upon attempting to write a multiline in something like JavaScript, or TypeScript, the model fails to use the tool correctly. Opencode’s write tool expects a string, whereas it attempts to instead write it in a json/object/array - like syntax.
Upon learning about this, I created a skill that mitigates against this behavior. The skill below does assist in mitigating the issue and does in fact allow for full writing of code:
---
name: writing-files
description: Assists nemotron with writing files when something goes wrong
---
# Writing files
**Applies to**: nemotron models
The `write` tool requires that input MUST be a string. It MUST NOT be an array or object. Please ensure before doing any file writing, that this format is used, in order to produce adequite outputs for files.
## Context for why
It has been discovered that when JSON, JS, TypeScript, syntax (or other related syntax), the output from the write tool becomes corrupted, and proceeds to generate output on a single line that is not usable.
## Your past-self wrote this:
> The write tool expects a string for the content parameter, not an array or object. Here's the exact format from the tool definition:
```json
{
filePath: "/absolute/path/to/file.js",
content: "your file content as a plain string"
}
```
> The issue is I passed an array/object ([{...}]) instead of a plain string.
---
Strange quirk, but I wanted to share this here in the event this quirk has yet to be discovered