Conversation
Strict function schemas require every key in `properties` to appear in `required`; add the missing `unit` so the chat tool-call test reflects the API contract. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a client for the OpenAI Responses API (`responses::`): request/response protocol types, streaming `StreamEvent`s, and the request builder. Latency knobs are first-class -- streaming, `service_tier`, `reasoning.effort`, opt-in reasoning summary, and a `prompt_cache_key`. Also add the GPT-5.5 `ReasoningEffort::Xhigh` level. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a WebSocket client for the OpenAI Realtime API (`realtime::`) over
tokio-tungstenite: session/client/server protocol types, the persistent
connection, and `RealtimeTruncation` for conversation-truncation control.
Add `estimate_text_tokens` (o200k_base) for UI token display and
`Error::{Tungstenite,Realtime}`.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add `examples/bench_latency.rs` measuring time-to-first-token (plus TTFB and total duration) across the Realtime, Responses, and Chat Completions backends under minimum-latency settings, reusing one persistent WebSocket for the realtime session. Reads config from the workspace niinii.toml. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a backend-agnostic `Backend` trait (translator/mod.rs) and move the shared render/config types (`ExchangeId`, `Response`, `ExchangeView`, `UsageView`, `TranslateConfig`) out of the chat backend so the UI and the VNDB addendum wiring no longer name a concrete handle. `chat` keeps its local context buffer; `responses` chains turns server-side via `previous_response_id`; `realtime` runs an always-streaming WebSocket session with configurable truncation. Promote `openai_api_endpoint` and `openai_model` to shared top-level settings (used by all backends) and add `ResponsesSettings` / `RealtimeSettings` with latency-oriented defaults. Wire the new backends into the settings/translator views and select among them via `Settings::translator_type`. Update the openai integration-test config loader to the renamed shared keys, and refresh CLAUDE.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compared to when I implemented this in #5 a year ago, the realtime models from OpenAI have improved a lot and are actually usable for translation purposes now.