Files
coder/aibridge/fixtures/openai/responses/blocking/commentary_builtin_tool.txtar
T
Paweł Banaszewski e00e85765b chore: move aibridge library code into coder repo (#24190)
This PR merges code from `coder/aibridge` repository into `coder/coder`.
It was split into 4 PRs for easier review but stacked PRs will need to
be merged into this PR so all checks pass.

* https://github.com/coder/coder/pull/24190 -> raw code copy (this PR,
before merging PRs on top of it, it was just 1 commit:
https://github.com/coder/coder/commit/70d33f33200c7e77df910957595715f81f9bec24)
* https://github.com/coder/coder/pull/24570 -> update imports in
`coder/coder` to use copied code
* https://github.com/coder/coder/pull/24586 -> linter fixes and CI
integration (also added README.md)
* https://github.com/coder/coder/pull/24571 -> added exclude to
scripts/check_emdash.sh check

Original PR message (before PR squash):
Moves coder/aibridge code into coder/coder repository.

Omitted files:

- `go.mod`, `go.sum`, `.gitignore`, `.github/workflows/ci.yml,`
`Makefile`, `LICENSE`, `README.md` (modified README.md is added later)
- `.github`, `example`, `buildinfo,` `scripts` directories

Simple verification script (will list omitted files)

```
tmp=$(mktemp -d)
echo "$tmp"
git clone --depth=1 https://github.com/coder/aibridge "$tmp/aibridge"
git clone --depth=1 --branch pb/aibridge-code-move https://github.com/coder/coder "$tmp/coder"
diff -rq --exclude=.git "$tmp/aibridge" "$tmp/coder/aibridge"
# rm -rf "$tmp"
```
2026-04-22 17:01:01 +02:00

140 lines
2.9 KiB
Plaintext

-- request --
{
"input": [
{
"role": "user",
"content": "Is 3 + 5 a prime number? Use the add function to calculate the sum."
}
],
"model": "gpt-5.4",
"stream": false,
"tools": [
{
"type": "function",
"name": "add",
"description": "Add two numbers together.",
"parameters": {
"type": "object",
"properties": {
"a": {
"type": "number"
},
"b": {
"type": "number"
}
},
"required": [
"a",
"b"
]
}
}
]
}
-- non-streaming --
{
"id": "resp_0aba2ac43dc240b30169b15720243c819ebb64977365d42cf5",
"object": "response",
"created_at": 1773229856,
"status": "completed",
"background": false,
"completed_at": 1773229861,
"error": null,
"incomplete_details": null,
"instructions": null,
"max_output_tokens": null,
"max_tool_calls": null,
"model": "gpt-5.4-2026-03-05",
"output": [
{
"id": "rs_0aba2ac43dc240b30169b157208c88819e8238a91b5f7a919b",
"type": "reasoning",
"status": "completed",
"encrypted_content": "gAAAAA==",
"summary": []
},
{
"id": "msg_0aba2ac43dc240b30169b1572286d0819eb24b1d0f84c8fb3f",
"type": "message",
"status": "completed",
"content": [
{
"type": "output_text",
"annotations": [],
"text": "Checking whether 3 + 5 is prime by calling the add function first."
}
],
"phase": "commentary",
"role": "assistant"
},
{
"id": "fc_0aba2ac43dc240b30169b157255604819e8a108124efc1635c",
"type": "function_call",
"status": "completed",
"arguments": "{\"a\":3,\"b\":5}",
"call_id": "call_A8TkZmIcKtw2Zw952Wc5QVe7",
"name": "add"
}
],
"parallel_tool_calls": true,
"previous_response_id": null,
"prompt_cache_key": null,
"prompt_cache_retention": null,
"reasoning": {
"effort": "xhigh",
"summary": null
},
"safety_identifier": null,
"service_tier": "default",
"store": false,
"temperature": 1.0,
"text": {
"format": {
"type": "text"
},
"verbosity": "low"
},
"tool_choice": "auto",
"tools": [
{
"type": "function",
"description": "Add two numbers together.",
"name": "add",
"parameters": {
"type": "object",
"properties": {
"a": {
"type": "number"
},
"b": {
"type": "number"
}
},
"required": [
"a",
"b"
],
"additionalProperties": false
},
"strict": true
}
],
"top_logprobs": 0,
"top_p": 0.98,
"truncation": "disabled",
"usage": {
"input_tokens": 58,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 30,
"output_tokens_details": {
"reasoning_tokens": 10
},
"total_tokens": 88
},
"user": null,
"metadata": {}
}