Title: Bug: HTTP 404 Error When Using OpenAI-Compatible Endpoint with Semantic Kernel 1.4.4-RC1 · Issue #330 · microsoft/semantic-kernel-java · GitHub
Open Graph Title: Bug: HTTP 404 Error When Using OpenAI-Compatible Endpoint with Semantic Kernel 1.4.4-RC1 · Issue #330 · microsoft/semantic-kernel-java
X Title: Bug: HTTP 404 Error When Using OpenAI-Compatible Endpoint with Semantic Kernel 1.4.4-RC1 · Issue #330 · microsoft/semantic-kernel-java
Description: Describe the bug When attempting to use an OpenAI-compatible endpoint (specifically https://api.siliconflow.cn/v1) with Semantic Kernel 1.4.4-RC1, I consistently receive HTTP 404 errors ("404 page not found") regardless of the invocation...
Open Graph Description: Describe the bug When attempting to use an OpenAI-compatible endpoint (specifically https://api.siliconflow.cn/v1) with Semantic Kernel 1.4.4-RC1, I consistently receive HTTP 404 errors ("404 page ...
X Description: Describe the bug When attempting to use an OpenAI-compatible endpoint (specifically https://api.siliconflow.cn/v1) with Semantic Kernel 1.4.4-RC1, I consistently receive HTTP 404 errors ("404 ...
Opengraph URL: https://github.com/microsoft/semantic-kernel-java/issues/330
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug: HTTP 404 Error When Using OpenAI-Compatible Endpoint with Semantic Kernel 1.4.4-RC1","articleBody":"**Describe the bug**\nWhen attempting to use an OpenAI-compatible endpoint (specifically https://api.siliconflow.cn/v1) with Semantic Kernel 1.4.4-RC1, I consistently receive HTTP 404 errors (\"404 page not found\") regardless of the invocation method.\n\n**Code Implementation**\n`OpenAIAsyncClient client = new OpenAIClientBuilder().credential(new KeyCredential(\"sk-key\")).endpoint(\"https://api.siliconflow.cn/v1\").buildAsyncClient();`\n\n`ChatCompletionService chatService = OpenAIChatCompletion.builder().withModelId(\"Qwen/Qwen2.5-32B-Instruct\").withOpenAIAsyncClient(client).build();`\n\n`Kernel kernel = Kernel.builder().withAIService(ChatCompletionService.class, chatService).withPlugin(lightPlugin).build();`\n\n**Error Occurrence**\nBoth invocation methods fail with the same 404 error:\n1、Prompt invocation:\n`kernel.invokePromptAsync(prompt, argss).block();`\n\n2、Direct chat service invocation:\n`chatService.getChatMessageContentsAsync(history, kernel, invocationContext).block();`\n\n**Error Details**\nFull stack trace shows:\n`00:37:50.318 [reactor-http-nio-1] WARN com.azure.core.implementation.serializer.HttpResponseBodyDecoder -- Failed to deserialize the error entity.\nUnsupported text Content-Type Type: class java.lang.Object\nException in thread \"main\" com.azure.core.exception.HttpResponseException: Status code 404, \"404 page not found\"\n\tat com.azure.core.implementation.http.rest.RestProxyBase.instantiateUnexpectedException(RestProxyBase.java:381)\n\tat com.azure.core.implementation.http.rest.AsyncRestProxy.lambda$ensureExpectedStatus$1(AsyncRestProxy.java:135)\n\tat reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:113)\n\tat reactor.core.publisher.MonoUsing$MonoUsingSubscriber.onNext(MonoUsing.java:231)\n\tat reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:129)\n\tat reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:224)\n\tat reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.onNext(FluxDoFinally.java:113)\n\tat reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onNext(FluxHandleFuseable.java:194)\n\tat reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107)\n\tat reactor.core.publisher.Operators$BaseFluxToMonoOperator.completePossiblyEmpty(Operators.java:2096)\n\tat reactor.core.publisher.MonoCollectList$MonoCollectListSubscriber.onComplete(MonoCollectList.java:118)\n\tat reactor.core.publisher.FluxPeek$PeekSubscriber.onComplete(FluxPeek.java:260)\n\tat reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144)\n\tat reactor.netty.channel.FluxReceive.onInboundComplete(FluxReceive.java:413)\n\tat reactor.netty.channel.ChannelOperations.onInboundComplete(ChannelOperations.java:455)\n\tat reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:509)\n\tat reactor.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:821)\n\tat reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:115)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat com.azure.core.http.netty.implementation.AzureSdkHandler.channelRead(AzureSdkHandler.java:224)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)\n\tat io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)\n\tat io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)\n\tat io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1515)\n\tat io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1389)\n\tat io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1429)\n\tat io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:530)\n\tat io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:469)\n\tat io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868)\n\tat io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:796)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:732)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:658)\n\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998)\n\tat io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\n\tat io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\n\tat java.base/java.lang.Thread.run(Thread.java:842)\n\tSuppressed: java.lang.Exception: #block terminated with an error\n\t\tat reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)\n\t\tat reactor.core.publisher.Mono.block(Mono.java:1779)\n\t\tat com.example.semantickernel_example.TextGenerationExample.main(TextGenerationExample.java:65)\nCaused by: java.lang.IllegalStateException: Unsupported text Content-Type Type: class java.lang.Object\n\tat com.azure.core.util.serializer.JacksonAdapter.deserializeText(JacksonAdapter.java:453)\n\tat com.azure.core.util.serializer.JacksonAdapter.lambda$deserialize$9(JacksonAdapter.java:354)\n\tat com.azure.core.util.serializer.JacksonAdapter.useAccessHelper(JacksonAdapter.java:491)\n\tat com.azure.core.util.serializer.JacksonAdapter.deserialize(JacksonAdapter.java:347)\n\tat com.azure.core.implementation.serializer.HttpResponseBodyDecoder.deserialize(HttpResponseBodyDecoder.java:176)\n\tat com.azure.core.implementation.serializer.HttpResponseBodyDecoder.deserializeBody(HttpResponseBodyDecoder.java:150)\n\tat com.azure.core.implementation.serializer.HttpResponseBodyDecoder.decodeByteArray(HttpResponseBodyDecoder.java:67)\n\tat com.azure.core.implementation.serializer.HttpResponseDecoder$HttpDecodedResponse.getDecodedBody(HttpResponseDecoder.java:93)`\n\n**Troubleshooting Attempts**\n1、Verified the endpoint URL is correct and accessible\n2、Confirmed the API key is valid\n3、Tested the same endpoint with direct HTTP requests (works fine)\n4、Tried with different model IDs\n5、Verified network connectivity and firewall settings\n\n**Expected Behavior**\nThe OpenAI-compatible endpoint should accept requests and return proper responses when used through Semantic Kernel's client.\n\n**Environment**\nSemantic Kernel version: 1.4.4-RC1\nJava version: 17\nOS: Windows 11 Pro\n\n**Additional Context**\nThe endpoint https://api.siliconflow.cn/v1 is confirmed to work with standard OpenAI API requests, suggesting this may be a client configuration or SDK compatibility issue.\n\n**Questions**\n1、Are there any additional configuration requirements for using non-Azure OpenAI endpoints?\n2、Is the OpenAIClientBuilderthe correct approach for third-party OpenAI-compatible services?\n3、Are there known issues with the 1.4.4-RC1 version regarding custom endpoints?\n","author":{"url":"https://github.com/GavinHwa","@type":"Person","name":"GavinHwa"},"datePublished":"2025-08-05T17:05:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/330/semantic-kernel-java/issues/330"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3082c047-6392-a90a-f758-2f00fb227b91 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BF1E:33952:5A90B90:7F60196:6A50061F |
| html-safe-nonce | d0b2102e28a51d826b0f618d34dea6fe9ea9104448759f5cbb78862929290978 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjFFOjMzOTUyOjVBOTBCOTA6N0Y2MDE5Njo2QTUwMDYxRiIsInZpc2l0b3JfaWQiOiI2OTEyNTQ3ODIwODQ0MDkwOTEyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 186e442fcc3ebc61dd8a7517f35bf3569d66cd88b1018191d63333849c1537a5 |
| hovercard-subject-tag | issue:3293815037 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/semantic-kernel-java/330/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f6a96563e0fb2b6149e46d97cb58cd54d6d7a26077f4fefe0e5d241edffb32c3/microsoft/semantic-kernel-java/issues/330 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f6a96563e0fb2b6149e46d97cb58cd54d6d7a26077f4fefe0e5d241edffb32c3/microsoft/semantic-kernel-java/issues/330 |
| og:image:alt | Describe the bug When attempting to use an OpenAI-compatible endpoint (specifically https://api.siliconflow.cn/v1) with Semantic Kernel 1.4.4-RC1, I consistently receive HTTP 404 errors ("404 page ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | GavinHwa |
| hostname | github.com |
| expected-hostname | github.com |
| None | 56eec25a3430492dd6ec2a480eb33256a0da5192d5714b0db4f5ab5f33203d94 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/semantic-kernel-java git https://github.com/microsoft/semantic-kernel-java.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 814249293 |
| octolytics-dimension-repository_nwo | microsoft/semantic-kernel-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 814249293 |
| octolytics-dimension-repository_network_root_nwo | microsoft/semantic-kernel-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e155b8a71f9284454f73118dfe5e634e74f7afb3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width