Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,8 @@ add_library(luce_common STATIC
src/qwen35/layer_split_daemon_loop.cpp
src/qwen35/qwen35_daemon.cpp
src/common/sampler.cpp
src/common/gbnf.cpp
src/common/output_constraint.cpp
src/common/backend_precision.cpp
src/common/daemon_loop.cpp
src/common/gguf_inspect.cpp
Expand Down Expand Up @@ -731,6 +733,7 @@ add_library(luce_common STATIC
src/server/tokenizer.cpp
src/server/chat_template.cpp
src/server/tool_parser.cpp
src/server/json_schema_grammar.cpp
src/server/tool_hint.cpp
src/server/tool_memory.cpp
src/server/response_error.cpp
Expand Down Expand Up @@ -2427,6 +2430,7 @@ if(LUCE_TESTS)
test/unit/test_mmq_tile_selection.cpp
test/unit/test_mixed_mmq_policy.cpp
test/unit/test_spec_acceptance.cpp
test/unit/test_output_constraint.cpp
test/unit/test_ds4_spec_sampling.cpp
test/unit/test_ds4_env.cpp
test/unit/test_kvflash_ubatch.cpp
Expand Down
11 changes: 5 additions & 6 deletions server/docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ Successful requests expose the measured result under `usage.timings`:
| `n` | int | — | Number of completions | ❌ TODO |
| `logprobs` | bool | — | Return log probabilities | ❌ TODO |
| `top_logprobs` | int | — | Number of top logprobs per token | ❌ TODO |
| `response_format` | object | — | JSON mode / structured output | ❌ TODO |
| `tool_choice` | string/object | — | Tool choice / force tool usage | ✅ |
| `response_format` | object | — | Structured output: `json_object`, or `json_schema` with a schema the reply follows exactly (grammar-constrained decoding) | ✅ |
| `tool_choice` | string/object | — | Tool choice; `required` or a named function forces a tool call | ✅ |
| `logit_bias` | object | — | Per-token logit adjustments | ❌ TODO |
| `user` | string | — | End-user identifier (tracking) | ❌ TODO |
| `stream_options` | object | — | Streaming options (e.g. include_usage) | ❌ TODO 🔴 |
Expand Down Expand Up @@ -124,7 +124,8 @@ Successful requests expose the measured result under `usage.timings`:
| `presence_penalty` | float | 0.0 | Penalize present tokens | ✅ |
| `thinking` | object | — | Thinking mode (`{"type":"enabled"}`) | ✅ |
| `tools` | array | — | Tool definitions | ✅ |
| `tool_choice` | string/object | — | Tool choice / force tool usage | ✅ |
| `tool_choice` | string/object | — | Tool choice; `any` or a named tool forces a tool call | ✅ |
| `output_format` | object | — | Structured output (`{"type":"json_schema","schema":{...}}`) | ✅ |
| `stop_sequences` | array | — | Stop sequences | ✅ |
| `metadata` | object | — | Request metadata (tracing) | ❌ TODO |

Expand Down Expand Up @@ -159,7 +160,7 @@ Follows Anthropic Messages API structure with `content` blocks:
| `parallel_tool_calls` | bool | — | Allow parallel tool calls | ❌ TODO 🔴 |
| `store` | bool | — | Persist response | ❌ TODO 🔴 |
| `include` | array | — | Include extra response fields | ❌ TODO 🔴 |
| `text` | object | — | Structured output / JSON schema | ❌ TODO 🔴 |
| `text` | object | — | Structured output (`{"format":{"type":"json_schema","schema":{...}}}`) | ✅ |
| `service_tier` | string | — | Routing hint | ❌ TODO 🔴 |
| `previous_response_id` | string | — | Multi-turn chaining | ❌ TODO |

Expand Down Expand Up @@ -247,14 +248,12 @@ support causes errors or silent feature degradation.
| **`parallel_tool_calls`** | Codex (Responses API) | Codex always sends `true`. Can accept and ignore (we serialize calls). |
| **`store`** | Codex (Responses API) | Controls response persistence. Accept field; can be no-op locally. |
| **`include`** | Codex (Responses API) | Controls what's included in response events. Accept field. |
| **`text` (structured output)** | Codex (Responses API) | JSON schema output formatting (`{"format":{"type":"json_schema","schema":{...}}}`). Needed for structured tool outputs. |
| **`service_tier`** | Codex (Responses API) | Routing hint (e.g., `"default"`). Accept and ignore. |

### 🟡 Medium Priority

| Feature | Used By | Notes |
|---------|---------|-------|
| **`response_format`** | Chat Completions API | JSON mode / structured output (OpenAI Chat format). |
| **`metadata`** | Claude Code (Anthropic) | Request metadata for tracing. Accept and ignore. |
| **`stream_options`** | Some OpenAI clients | `{"include_usage": true}` — usage in final streaming chunk. |
| **Input validation** | — | Clamp penalty ranges [-2,2], reject invalid params with 400. |
Expand Down
Loading
Loading