{"record":{"id":"810ca1c9801663be","repo":"floci-io/floci","slug":"unsupportedoperationexception","errorCode":"UnsupportedOperationException","errorMessage":"InvokeModelWithResponseStream is not supported by Floci yet. Use InvokeModel or Converse instead.","messagePattern":"InvokeModelWithResponseStream is not supported by Floci yet\\. Use InvokeModel or Converse instead\\.","errorType":"error_code","errorClass":"AwsException","httpStatus":501,"severity":"warning","filePath":"src/main/java/io/github/hectorvent/floci/services/bedrockruntime/BedrockRuntimeController.java","lineNumber":91,"sourceCode":"    @Blocking\n    @Path(\"/{modelId:.+}/invoke\")\n    @Consumes(MediaType.WILDCARD)\n    public Response invokeModel(@PathParam(\"modelId\") String modelId, byte[] body) {\n        if (modelId == null || modelId.isBlank()) {\n            throw new AwsException(\"ValidationException\", \"modelId is required.\", 400);\n        }\n        // Bedrock InvokeModel bodies are model-specific opaque blobs; do not parse.\n        byte[] response = service.buildInvokeModelResponse(modelId, body);\n        LOG.debugv(\"Bedrock InvokeModel: modelId={0}, bodyBytes={1}\",\n                modelId, body == null ? 0 : body.length);\n        return Response.ok(response, MediaType.APPLICATION_JSON).build();\n    }\n\n    @POST\n    @Path(\"/{modelId:.+}/invoke-with-response-stream\")\n    @Consumes(MediaType.WILDCARD)\n    public Response invokeModelWithResponseStream(@PathParam(\"modelId\") String modelId) {\n        throw new AwsException(\"UnsupportedOperationException\",\n                \"InvokeModelWithResponseStream is not supported by Floci yet. \"\n                        + \"Use InvokeModel or Converse instead.\", 501);\n    }\n\n    @POST\n    @Path(\"/{modelId:.+}/converse-stream\")\n    @Consumes(MediaType.WILDCARD)\n    public Response converseStream(@PathParam(\"modelId\") String modelId) {\n        throw new AwsException(\"UnsupportedOperationException\",\n                \"ConverseStream is not supported by Floci yet. \"\n                        + \"Use Converse instead.\", 501);\n    }\n}\n","sourceCodeStart":73,"sourceCodeEnd":105,"githubUrl":"https://github.com/floci-io/floci/blob/62ff490619e7bd3554597c28c704081b4c15add5/src/main/java/io/github/hectorvent/floci/services/bedrockruntime/BedrockRuntimeController.java#L73-L105","documentation":"Floci does not implement the streaming variant of Bedrock InvokeModel. The endpoint is declared (so clients get a defined 501 rather than a 404) but immediately rejects the call, directing you to the non-streaming InvokeModel or Converse operations.","triggerScenarios":"Calling the AWS SDK invokeModelWithResponseStream(...) or POST /model/{modelId}/invoke-with-response-stream against Floci.","commonSituations":"Reusing production code that streams tokens; SDK response-stream handlers are default in some wrappers. There is no configuration to enable it — it is a capability gap.","solutions":["Switch the call to invokeModel (non-streaming) or converse","If streaming is mandatory, route Bedrock traffic to real AWS or another provider and use Floci only for other services","Watch the Floci roadmap/issues for streaming support before upgrading"],"exampleFix":"// before\nResponseHandler<InvokeModelWithResponseStreamResponse, ?> h = ...;\nclient.invokeModelWithResponseStream(req -> req.modelId(m), h);\n// after\nInvokeModelResponse r = client.invokeModel(req -> req.modelId(m).body(b -> b.text(prompt)));","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    client.invokeModelWithResponseStream(req, handler);\n} catch (SdkException e) { // Floci returns 501\n    InvokeModelResponse r = client.invokeModel(req2); // non-streaming fallback\n}","preventionTips":["Feature-detect streaming support with a startup probe call against the emulator","Abstract the LLM call behind an interface with stream() and blocking() implementations"],"tags":["bedrock","not-implemented","streaming","floci"],"backgroundTag":null,"analyzedSha":"62ff490619e7bd3554597c28c704081b4c15add5","analyzedAt":"2026-08-14T14:25:23.764Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}