mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 14:30:28 -05:00
* feat(bedrock): add proxy backend for real LLM responses via OpenAI-compatible API * fix(bedrock): preserve leading text when a tool call response also has content OpenAI-compatible backends can return assistant text alongside tool_calls in the same response (e.g. a preamble before invoking a tool). The Converse translation only emitted the toolUse block in that case, silently dropping the text. * fix(bedrock): use InternalServerException for proxy serialization failures InternalFailure isn't a bedrock-runtime error shape in botocore/the Java SDK, so clients couldn't map it; InternalServerException is the declared 500 for this API. * fix(bedrock): map proxy backend timeouts to ModelTimeoutException (408) HttpTimeoutException (connect or request timeout) was falling into the generic catch and surfacing as ModelErrorException/424, which the AWS SDKs treat as terminal. Bedrock's dedicated 408 shape is retryable under the default SDK retry strategy, so this distinction is load-bearing, not cosmetic. Also makes the request timeout configurable (proxy.request-timeout-seconds, default 60s) since larger models on CPU-backed backends may need more headroom than the default. * fix(bedrock): fail fast on InvokeModel under the proxy backend Falling back to StubBackend's canned response meant a caller who configured a real proxy backend and called InvokeModel got a plausible-looking, entirely fabricated completion with no signal beyond a server-side log line. That's inconsistent with Converse, which already fails loudly on misconfiguration, and worse: InvokeModel is still the default entry point for many SDK wrappers, so this could silently mask a broken integration. Also fixes the streaming-endpoint error messages, which blamed "the Floci stub" for a limitation that's actually unconditional (streaming isn't implemented for any backend).