Conversation
TrueFoundry custom endpoints are transparent proxies. Jev is TypeSafe's evaluation API (POST /v1/systemone), so the OpenAI-compatible client appending /chat/completions returns 404. Route OpenAI-compatible custom endpoints through proxy-api, and reject non-chat upstreams before the request.
🦋 Changeset detectedLatest commit: 9d7e282 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Agent turns against a TrueFoundry custom endpoint named Jev failed with
Request failed (404): Not Foundonhttps://gateway.truefoundry.ai/proxy-api/jev/custom-endpoint/chat/completions.Jev is TypeSafe's evaluation API (
POST /v1/systemone), not an OpenAI chat model. The gateway custom-endpoint proxy forwards the extra path as-is, and the OpenAI-compatible client always appends/chat/completions, so the upstream returns FastAPI's{"detail":"Not Found"}. Jev also has no tools or streaming text, so it cannot run an agent turn.Changes
{gateway}/proxy-api/{account}/{endpoint}, appending/chat/completionsonly when the upstream base is an OpenAI/vNroot.invocation_errorand reject the model with HTTP 422 before the LLM call./chat/completions. A 404 on that proxy path now namesPOST /v1/systemone.How was this tested?
pnpm --filter @truefoundry/trueforge-core test -- tests/core/llm/VercelAILLM.model.test.ts tests/core/llm/VercelAILLM.stream.test.tspnpm --filter @truefoundry/trueforge test -- tests/unit/truefoundry/mapEnabledModels.test.ts tests/unit/truefoundry/TrueFoundryModelProviderStore.test.ts tests/unit/truefoundry/trueFoundryNaming.test.ts tests/unit/runtime/sessionResources.test.ts tests/unit/schemas/modelProvider.test.tspnpm --filter @truefoundry/trueforge-core typecheckandpnpm --filter @truefoundry/trueforge typecheckChecklist
packages/trueforge-sdk,python/trueforge_sdk, OpenAPI specs)pnpm build,pnpm test,pnpm lint:ci, andpnpm format:checkwere not run; targeted tests, typecheck, and eslint on the changed sources passed