Skip to content

Remove inaccurate host-routing note from semantic-search docs#324

Open
etbyrd wants to merge 2 commits into
mainfrom
remove-inaccurate-semantic-search-host-routing-note
Open

Remove inaccurate host-routing note from semantic-search docs#324
etbyrd wants to merge 2 commits into
mainfrom
remove-inaccurate-semantic-search-host-routing-note

Conversation

@etbyrd

@etbyrd etbyrd commented Jul 19, 2026

Copy link
Copy Markdown
Member

Problem

The semanticSearch operation description in openapi/primitive-api.yaml claimed:

Host routing: this operation is served only by the search host (https://api.primitive.dev/v1). The typed SDKs route it there automatically.

Both sentences are inaccurate. The generated client issues the request as a relative path against the client's configured base URL, exactly like every other operation:

// packages/api-core/src/api/sdk.gen.ts
export const semanticSearch = (...) => (options.client ?? client).post({
    url: '/semantic-search',   // no per-operation server override

There is no automatic per-operation routing. The paired operation-level servers override was dead metadata for the same reason: the code generator does not emit per-operation servers, so it never affected where the request went.

Change

  • Remove the false "Host routing" paragraph from the operation description.
  • Remove the unused operation-level servers override.
  • Regenerate the derived artifacts (primitive-api.codegen.json, sdk.gen.ts, types.gen.ts, openapi.generated.ts, operations.generated.ts).

The rest of the description (modes, scoring, pagination, entitlement) is unchanged and already fully documents the endpoint. make node-check-generated passes on the committed tree.

Note

The /send-mail operation carries a similar "the typed SDKs route it automatically" phrase, but its situation differs (it genuinely documents a two-host body-size behavior and its default base URL matches), so it is left as-is here. Flagging it in case a follow-up wants to align the wording.

The semanticSearch operation description claimed the typed SDKs route the
request to a dedicated search host automatically. They do not: the
generated client issues the request against the client's configured base
URL like every other operation, with no per-operation server override.
The paired operation-level servers entry was dead metadata for the same
reason. Removing both, and regenerating the derived artifacts.
@greptile-apps

greptile-apps Bot commented Jul 19, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
openapi/primitive-api.yaml Removes the semanticSearch host-routing text and operation-level server override from the source OpenAPI contract.
openapi/primitive-api.codegen.json Mirrors the semanticSearch description and server metadata removal in the generated OpenAPI codegen artifact.
packages/api-core/src/openapi/openapi.generated.ts Mirrors the semanticSearch description and server metadata removal in the exported OpenAPI document.
packages/api-core/src/openapi/operations.generated.ts Updates the semanticSearch operation manifest description after removing the host-routing prose.
packages/api-core/src/api/sdk.gen.ts Updates the generated TypeScript semanticSearch documentation without changing the request path.
packages/api-core/src/api/types.gen.ts Updates the generated baseUrl union after the server metadata change.
sdk-python/src/primitive/api/api/search/semantic_search.py Updates generated Python semanticSearch docstrings without changing request construction.
sdk-go/api/oas_client_gen.go Updates generated Go client comments for semanticSearch.
sdk-go/api/oas_handlers_gen.go Updates generated Go handler comments for semanticSearch.
sdk-go/api/oas_server_gen.go Updates generated Go server interface comments for semanticSearch.
sdk-go/api/oas_unimplemented_gen.go Updates generated Go unimplemented handler comments for semanticSearch.

Reviews (2): Last reviewed commit: "Regenerate Go and Python artifacts for t..." | Re-trigger Greptile

Comment thread openapi/primitive-api.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant