kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
pull/715/head
rodzic
97ef693abc
commit
ea69f55bdf
|
@ -5,7 +5,7 @@ import type { GatewayHonoContext, McpToolCallResponse } from './types'
|
||||||
import { cfValidateJsonSchemaObject } from './cf-validate-json-schema-object'
|
import { cfValidateJsonSchemaObject } from './cf-validate-json-schema-object'
|
||||||
|
|
||||||
export async function createHttpResponseFromMcpToolCallResponse(
|
export async function createHttpResponseFromMcpToolCallResponse(
|
||||||
ctx: GatewayHonoContext,
|
_ctx: GatewayHonoContext,
|
||||||
{
|
{
|
||||||
tool,
|
tool,
|
||||||
deployment,
|
deployment,
|
||||||
|
@ -21,6 +21,11 @@ export async function createHttpResponseFromMcpToolCallResponse(
|
||||||
500,
|
500,
|
||||||
`Internal logic error for origin adapter type "${deployment.originAdapter.type}"`
|
`Internal logic error for origin adapter type "${deployment.originAdapter.type}"`
|
||||||
)
|
)
|
||||||
|
assert(
|
||||||
|
!toolCallResponse.isError,
|
||||||
|
502,
|
||||||
|
`MCP tool "${tool.name}" returned an error.`
|
||||||
|
)
|
||||||
|
|
||||||
if (tool.outputSchema) {
|
if (tool.outputSchema) {
|
||||||
assert(
|
assert(
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
- MCP origin server support
|
- MCP origin server support
|
||||||
- add support for custom headers on responses
|
- add support for custom headers on responses
|
||||||
- how to handle binary bodies and responses?
|
- how to handle binary bodies and responses?
|
||||||
|
- add requestId to all JSON error responses
|
||||||
|
|
||||||
## TODO Post-MVP
|
## TODO Post-MVP
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue