More accurate tool calls than GPT-6.1 Sol, 90% cheaper
A coding agent works through tool calls, from opening a file to running the tests. SIE serves GLM-5.3-Flash, an open model, behind an OpenAI-compatible API, so switching an agent means changing its base URL and model name.
SIE GLM-5.3-Flash
Tests passMake the tests pass. Run them with uv run pytest -q. Do not change the tests.
-
read
invoice_totals/amounts.py -
read
tests/test_amounts.py -
edit
invoice_totals/amounts.pyif cleaned.startswith("(") and cleaned.endswith(")"): cleaned = "-" + cleaned[1:-1].strip()return Decimal(cleaned)
-
bash
uv run pytest -q3 passed in 0.00s
GPT-6 Luna invents a date; Claude Sonnet 5.5 makes a stray Write call
GPT-6 Luna (high reasoning)
Wrong value-
concert_info_getdateTime frame to get the concert for.
concert_info_get({ "date": "April 2026", "genre": "Pop", "location": "New York"}) concert_info_get({ "date": "next month", "genre": "Pop", "location": "New York"}) Claude Sonnet 5.5
Stray Write call- anthropics / claude-code Claude Sonnet 5.5 subagents make a throwaway Write call to a mangled path, logged 19 times
[BUG] Sonnet 5.5 subagents issue a throwaway Write ("x" / "placeholder") to a mangled scratchpad path, leaving junk files under the temp root #100328
No text or reasoning precedes the stray call.
- TechCrunch Faros AI's chief executive relays a CTO's account: one engineer spent $40,000 on tokens in a month
The token bill comes due: Inside the industry scramble to manage AI's runaway costs
90% cheaper than GPT-6.1 Sol, more accurate than GPT-6 Luna
- Tested
- 600 requests from the Berkeley Function Calling Leaderboard, each with its functions
- Scored
- A call is right when its function and every argument match the benchmark's answer
- Prices
- OpenAI and Anthropic list prices; SIE at its Serverless price
Send the failing file and your tools, get back the edit that fixes it
import jsonfrom sie_sdk import SIEClientclient = SIEClient(api_key="API keysk-sie-…")tools = json.loads("""[ { "type": "function", "function": { "name": "read_file", "description": "Read a file in the repository and return its contents.", "parameters": {"type": "object", "properties": {"filePath": {"type": "string", "description": "Path of the file, relative to the repository root"}}, "required": ["filePath"], "additionalProperties": false} } }, { "type": "function", "function": { "name": "edit", "description": "Replace an exact string in a file with new text.", "parameters": {"type": "object", "properties": {"filePath": {"type": "string", "description": "Path of the file, relative to the repository root"}, "oldString": {"type": "string", "description": "The exact text to replace"}, "newString": {"type": "string", "description": "The text to put in its place"}, "replaceAll": {"type": "boolean", "description": "Replace every occurrence (default false)"}}, "required": ["filePath", "oldString", "newString"], "additionalProperties": false} } }]""")messages = [ {"role": "system", "content": "instructionYou are a coding agent working in a Python repository. Change files only with the tools you are given."}, {"role": "user", "content": "textinvoice_totals/amounts.py:
```python
"""Parse the amount column of an exported invoice into Decimal values."""
from decimal import Decimal
def parse_amount(text: str) -> Decimal:
"""Turn one amount cell into a Decimal.
Accepts "$1,234.50", "1234.5" and " 12.00 ". A credit is written with
parentheses, "(12.00)", and is a negative amount.
"""
cleaned = text.strip().replace("$", "").replace(",", "")
return Decimal(cleaned)
def total(cells: list[str]) -> Decimal:
"""Net total of the amount column, credits subtracted."""
return sum((parse_amount(cell) for cell in cells), Decimal(0))
```
tests/test_amounts.py fails: test_credit_in_parentheses_is_negative expects parse_amount("(12.00)") to equal Decimal("-12.00"). Fix parse_amount so a credit written in parentheses parses as a negative amount. Do not change the tests."},]result = client.chat_completions( "modelzai-org/GLM-5.3-Flash:relay", messages, max_completion_tokens=max tokens4096, extra_body={"temperature":0,"top_p":1}, tools=tools,)message = result["choices"][0]["message"]if message.get("content"): print(message["content"])for call in message.get("tool_calls") or []: args = call["function"]["arguments"] try: args = json.loads(args or "{}") except json.JSONDecodeError: pass print(call["function"]["name"], args)import { SIEClient, type ToolSpec } from '@superlinked/sie-sdk';
const client = new SIEClient(undefined, { apiKey: 'sk-sie-…' });
const tools: ToolSpec[] = [
{
"type": "function",
"function": {
"name": "read_file",
"description": "Read a file in the repository and return its contents.",
"parameters": {"type": "object", "properties": {"filePath": {"type": "string", "description": "Path of the file, relative to the repository root"}}, "required": ["filePath"], "additionalProperties": false}
}
},
{
"type": "function",
"function": {
"name": "edit",
"description": "Replace an exact string in a file with new text.",
"parameters": {"type": "object", "properties": {"filePath": {"type": "string", "description": "Path of the file, relative to the repository root"}, "oldString": {"type": "string", "description": "The exact text to replace"}, "newString": {"type": "string", "description": "The text to put in its place"}, "replaceAll": {"type": "boolean", "description": "Replace every occurrence (default false)"}}, "required": ["filePath", "oldString", "newString"], "additionalProperties": false}
}
}
];
const result = await client.chatCompletions({
model: 'zai-org/GLM-5.3-Flash:relay',
messages: [
{ role: 'system', content: "You are a coding agent working in a Python repository. Change files only with the tools you are given." },
{ role: 'user', content: "invoice_totals/amounts.py:\n\n```python\n\"\"\"Parse the amount column of an exported invoice into Decimal values.\"\"\"\n\nfrom decimal import Decimal\n\n\ndef parse_amount(text: str) -> Decimal:\n \"\"\"Turn one amount cell into a Decimal.\n\n Accepts \"$1,234.50\", \"1234.5\" and \" 12.00 \". A credit is written with\n parentheses, \"(12.00)\", and is a negative amount.\n \"\"\"\n cleaned = text.strip().replace(\"$\", \"\").replace(\",\", \"\")\n return Decimal(cleaned)\n\n\ndef total(cells: list[str]) -> Decimal:\n \"\"\"Net total of the amount column, credits subtracted.\"\"\"\n return sum((parse_amount(cell) for cell in cells), Decimal(0))\n```\n\ntests/test_amounts.py fails: test_credit_in_parentheses_is_negative expects parse_amount(\"(12.00)\") to equal Decimal(\"-12.00\"). Fix parse_amount so a credit written in parentheses parses as a negative amount. Do not change the tests." },
],
max_completion_tokens: 4096,
temperature: 0,
top_p: 1,
tools,
});
const message = result.choices[0]?.message;
if (message?.content) console.log(message.content);
for (const call of message?.tool_calls ?? []) {
let args: unknown = call.function.arguments;
try {
args = JSON.parse(call.function.arguments || '{}');
} catch {}
console.log(call.function.name, args);
}curl https://api.superlinked.com/v1/chat/completions \
-H "Authorization: Bearer sk-sie-…" \
-H "Content-Type: application/json" \
-d "{\"model\":\"zai-org/GLM-5.3-Flash:relay\",\"messages\":[{\"role\":\"system\",\"content\":\"You are a coding agent working in a Python repository. Change files only with the tools you are given.\"},{\"role\":\"user\",\"content\":\"invoice_totals/amounts.py:\\n\\n\`\`\`python\\n\\\"\\\"\\\"Parse the amount column of an exported invoice into Decimal values.\\\"\\\"\\\"\\n\\nfrom decimal import Decimal\\n\\n\\ndef parse_amount(text: str) -> Decimal:\\n \\\"\\\"\\\"Turn one amount cell into a Decimal.\\n\\n Accepts \\\"\$1,234.50\\\", \\\"1234.5\\\" and \\\" 12.00 \\\". A credit is written with\\n parentheses, \\\"(12.00)\\\", and is a negative amount.\\n \\\"\\\"\\\"\\n cleaned = text.strip().replace(\\\"\$\\\", \\\"\\\").replace(\\\",\\\", \\\"\\\")\\n return Decimal(cleaned)\\n\\n\\ndef total(cells: list[str]) -> Decimal:\\n \\\"\\\"\\\"Net total of the amount column, credits subtracted.\\\"\\\"\\\"\\n return sum((parse_amount(cell) for cell in cells), Decimal(0))\\n\`\`\`\\n\\ntests/test_amounts.py fails: test_credit_in_parentheses_is_negative expects parse_amount(\\\"(12.00)\\\") to equal Decimal(\\\"-12.00\\\"). Fix parse_amount so a credit written in parentheses parses as a negative amount. Do not change the tests.\"}],\"max_completion_tokens\":4096,\"temperature\":0,\"top_p\":1,\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"read_file\",\"description\":\"Read a file in the repository and return its contents.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"filePath\":{\"type\":\"string\",\"description\":\"Path of the file, relative to the repository root\"}},\"required\":[\"filePath\"],\"additionalProperties\":false}}},{\"type\":\"function\",\"function\":{\"name\":\"edit\",\"description\":\"Replace an exact string in a file with new text.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"filePath\":{\"type\":\"string\",\"description\":\"Path of the file, relative to the repository root\"},\"oldString\":{\"type\":\"string\",\"description\":\"The exact text to replace\"},\"newString\":{\"type\":\"string\",\"description\":\"The text to put in its place\"},\"replaceAll\":{\"type\":\"boolean\",\"description\":\"Replace every occurrence (default false)\"}},\"required\":[\"filePath\",\"oldString\",\"newString\"],\"additionalProperties\":false}}}]}"Build the "Coding" capability into my app using the Superlinked Inference Engine (SIE).
Context
- SIE is an OpenAI-style inference API. Python SDK: `from sie_sdk import SIEClient`; TypeScript: `@superlinked/sie-sdk`.
- Base URL: https://api.superlinked.com (or my regional endpoint). Auth: Bearer key from env `SIE_API_KEY` (never hard-code it).
- Model: zai-org/GLM-5.3-Flash:relay (OpenAI-compatible endpoint: /v1/chat/completions). Keep the model id configurable.
Task
- Input: a source file and a request to change it, plus the coding agent's tools.
- Behaviour: return the tool calls the model makes to change the file: each call's function name and its parsed arguments
- Send one POST /v1/chat/completions request (SDK: chat_completions / chatCompletions) with an optional system message for instructions, the user's text as the user message, and max_completion_tokens 4096, temperature 0, top_p 1. Send the tools below unchanged as tools; send no tool_choice. Read any reply text from choices[0].message.content and each tool call from choices[0].message.tool_calls: its function.name, and its function.arguments, a JSON string to parse. Tools, sent as given: [{"type":"function","function":{"name":"read_file","description":"Read a file in the repository and return its contents.","parameters":{"type":"object","properties":{"filePath":{"type":"string","description":"Path of the file, relative to the repository root"}},"required":["filePath"],"additionalProperties":false}}},{"type":"function","function":{"name":"edit","description":"Replace an exact string in a file with new text.","parameters":{"type":"object","properties":{"filePath":{"type":"string","description":"Path of the file, relative to the repository root"},"oldString":{"type":"string","description":"The exact text to replace"},"newString":{"type":"string","description":"The text to put in its place"},"replaceAll":{"type":"boolean","description":"Replace every occurrence (default false)"}},"required":["filePath","oldString","newString"],"additionalProperties":false}}}]
Deliverables
- A typed client wrapper, an application-level function for this task, error handling for timeouts/empty input, and unit tests with a stubbed client.
- Wire it into my existing stack (ask me which framework if unclear) and add a short usage example.- tool_calls[0].function.name
edit- arguments.filePath
invoice_totals/amounts.py- arguments.oldString
cleaned = text.strip().replace("$", "").replace(",", "") return Decimal(cleaned)
- arguments.newString
cleaned = text.strip().replace("$", "").replace(",", "") if cleaned.startswith("(") and cleaned.endswith(")"): cleaned = "-" + cleaned[1:-1] return Decimal(cleaned)
Run your coding agent on Serverless or on your own cluster, down to one GPU
SIE Serverless
We host the models; you call one API.
- No idle GPUs, pay for what you use
- Fits your stack: SDK, API, CLI, MCP
- Self-host the same open-source engine
- SOC 2 Type 2, US or EU data residency
- Create an account to try Serverless
SIE Cluster
Kubernetes in your own cloud, backed by our engineers.
- Terraform modules for your cloud
- Apache-2.0, same engine as Serverless
- GPU workers scale to zero between jobs
- Separate worker pools for each tenant
Deploy SIE to our AWS account with the superlinked/sie/aws Terraform module. Docs: superlinked.com/docs/deployment.Deploy SIE to our Google Cloud project with the superlinked/sie/google Terraform module. Docs: superlinked.com/docs/deployment.Deploy SIE to our Azure subscription with the superlinked/sie/azure Terraform module. Docs: superlinked.com/docs/deployment.Deploy SIE to our Alibaba Cloud account with the superlinked/sie/alicloud Terraform module. Docs: superlinked.com/docs/deployment. SIE Local
The open-source server on your own machine.
- Qwen3.8-27B on one NVIDIA H100, 80 GB
- Six 61K-token agent sessions per H100
- Process your data fully offline
- Same OpenAI-compatible API as Serverless
docker run --gpus all -p 127.0.0.1:8080:8080 ghcr.io/superlinked/sie-server:latest-cuda13-sglang-cu130 serve --host 0.0.0.0 --port 8080 --models-dir /app/models --preload Qwen/Qwen3.8-27B-FP8:h100-256k-batch