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'
|
||||
|
||||
export async function createHttpResponseFromMcpToolCallResponse(
|
||||
ctx: GatewayHonoContext,
|
||||
_ctx: GatewayHonoContext,
|
||||
{
|
||||
tool,
|
||||
deployment,
|
||||
|
@ -21,6 +21,11 @@ export async function createHttpResponseFromMcpToolCallResponse(
|
|||
500,
|
||||
`Internal logic error for origin adapter type "${deployment.originAdapter.type}"`
|
||||
)
|
||||
assert(
|
||||
!toolCallResponse.isError,
|
||||
502,
|
||||
`MCP tool "${tool.name}" returned an error.`
|
||||
)
|
||||
|
||||
if (tool.outputSchema) {
|
||||
assert(
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
- MCP origin server support
|
||||
- add support for custom headers on responses
|
||||
- how to handle binary bodies and responses?
|
||||
- add requestId to all JSON error responses
|
||||
|
||||
## TODO Post-MVP
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue