From 4764be5d99a49f63374c5fcd46d582770074d16b Mon Sep 17 00:00:00 2001 From: Ethan Byrd Date: Sun, 19 Jul 2026 12:56:40 -0700 Subject: [PATCH 1/2] Remove inaccurate host-routing note from semantic-search docs 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. --- openapi/primitive-api.codegen.json | 8 +------- openapi/primitive-api.yaml | 7 ------- packages/api-core/src/api/sdk.gen.ts | 4 ---- packages/api-core/src/api/types.gen.ts | 2 +- packages/api-core/src/openapi/openapi.generated.ts | 8 +------- packages/api-core/src/openapi/operations.generated.ts | 2 +- 6 files changed, 4 insertions(+), 27 deletions(-) diff --git a/openapi/primitive-api.codegen.json b/openapi/primitive-api.codegen.json index fe39aed9..3c0ca485 100644 --- a/openapi/primitive-api.codegen.json +++ b/openapi/primitive-api.codegen.json @@ -3896,13 +3896,7 @@ "post": { "operationId": "semanticSearch", "summary": "Semantic search across received and sent mail", - "description": "Ranked search across both received and sent mail. The `mode`\nfield selects the ranking strategy:\n\n- `keyword`: lexical full-text matching only (no embeddings).\n- `semantic`: meaning-based matching using vector embeddings.\n- `hybrid` (default): blends the semantic and keyword signals.\n\nResults are ordered by a relevance `score`. Every row reports the\nfields it matched (`matched_fields`), a match-centered excerpt per\nfield (`snippets`), and a `score_breakdown` whose components account\nfor the `score`. Page through results by passing the prior\nresponse's `meta.cursor` back as `cursor`.\n\nRequires the Pro plan and the `semantic_search_enabled`\nentitlement; callers without them receive `403`.\n\nHost routing: this operation is served only by the search host\n(`https://api.primitive.dev/v1`). The typed SDKs route it there\nautomatically.\n", - "servers": [ - { - "url": "https://api.primitive.dev/v1", - "description": "Search host" - } - ], + "description": "Ranked search across both received and sent mail. The `mode`\nfield selects the ranking strategy:\n\n- `keyword`: lexical full-text matching only (no embeddings).\n- `semantic`: meaning-based matching using vector embeddings.\n- `hybrid` (default): blends the semantic and keyword signals.\n\nResults are ordered by a relevance `score`. Every row reports the\nfields it matched (`matched_fields`), a match-centered excerpt per\nfield (`snippets`), and a `score_breakdown` whose components account\nfor the `score`. Page through results by passing the prior\nresponse's `meta.cursor` back as `cursor`.\n\nRequires the Pro plan and the `semantic_search_enabled`\nentitlement; callers without them receive `403`.\n", "tags": [ "Search" ], diff --git a/openapi/primitive-api.yaml b/openapi/primitive-api.yaml index b724cc8c..045fabfa 100644 --- a/openapi/primitive-api.yaml +++ b/openapi/primitive-api.yaml @@ -2886,13 +2886,6 @@ paths: Requires the Pro plan and the `semantic_search_enabled` entitlement; callers without them receive `403`. - - Host routing: this operation is served only by the search host - (`https://api.primitive.dev/v1`). The typed SDKs route it there - automatically. - servers: - - url: https://api.primitive.dev/v1 - description: Search host tags: [Search] requestBody: required: true diff --git a/packages/api-core/src/api/sdk.gen.ts b/packages/api-core/src/api/sdk.gen.ts index af7bd108..be2ca3f6 100644 --- a/packages/api-core/src/api/sdk.gen.ts +++ b/packages/api-core/src/api/sdk.gen.ts @@ -1164,10 +1164,6 @@ export const sendEmail = (options: Options * Requires the Pro plan and the `semantic_search_enabled` * entitlement; callers without them receive `403`. * - * Host routing: this operation is served only by the search host - * (`https://api.primitive.dev/v1`). The typed SDKs route it there - * automatically. - * */ export const semanticSearch = (options: Options) => (options.client ?? client).post({ security: [{ scheme: 'bearer', type: 'http' }], diff --git a/packages/api-core/src/api/types.gen.ts b/packages/api-core/src/api/types.gen.ts index 7cd16ddc..3b48cd89 100644 --- a/packages/api-core/src/api/types.gen.ts +++ b/packages/api-core/src/api/types.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: 'https://api.primitive.dev/v1' | 'https://www.primitive.dev/api/v1' | 'https://api.primitive.dev/v1' | 'https://www.primitive.dev/api/v1' | 'https://api.primitive.dev/v1' | 'https://www.primitive.dev/api/v1' | 'https://api.primitive.dev/v1' | (string & {}); + baseUrl: 'https://api.primitive.dev/v1' | 'https://www.primitive.dev/api/v1' | 'https://api.primitive.dev/v1' | 'https://www.primitive.dev/api/v1' | 'https://api.primitive.dev/v1' | 'https://www.primitive.dev/api/v1' | (string & {}); }; /** diff --git a/packages/api-core/src/openapi/openapi.generated.ts b/packages/api-core/src/openapi/openapi.generated.ts index bcd99ff4..3ee31806 100644 --- a/packages/api-core/src/openapi/openapi.generated.ts +++ b/packages/api-core/src/openapi/openapi.generated.ts @@ -3903,13 +3903,7 @@ export const openapiDocument: Record = { "post": { "operationId": "semanticSearch", "summary": "Semantic search across received and sent mail", - "description": "Ranked search across both received and sent mail. The `mode`\nfield selects the ranking strategy:\n\n- `keyword`: lexical full-text matching only (no embeddings).\n- `semantic`: meaning-based matching using vector embeddings.\n- `hybrid` (default): blends the semantic and keyword signals.\n\nResults are ordered by a relevance `score`. Every row reports the\nfields it matched (`matched_fields`), a match-centered excerpt per\nfield (`snippets`), and a `score_breakdown` whose components account\nfor the `score`. Page through results by passing the prior\nresponse's `meta.cursor` back as `cursor`.\n\nRequires the Pro plan and the `semantic_search_enabled`\nentitlement; callers without them receive `403`.\n\nHost routing: this operation is served only by the search host\n(`https://api.primitive.dev/v1`). The typed SDKs route it there\nautomatically.\n", - "servers": [ - { - "url": "https://api.primitive.dev/v1", - "description": "Search host" - } - ], + "description": "Ranked search across both received and sent mail. The `mode`\nfield selects the ranking strategy:\n\n- `keyword`: lexical full-text matching only (no embeddings).\n- `semantic`: meaning-based matching using vector embeddings.\n- `hybrid` (default): blends the semantic and keyword signals.\n\nResults are ordered by a relevance `score`. Every row reports the\nfields it matched (`matched_fields`), a match-centered excerpt per\nfield (`snippets`), and a `score_breakdown` whose components account\nfor the `score`. Page through results by passing the prior\nresponse's `meta.cursor` back as `cursor`.\n\nRequires the Pro plan and the `semantic_search_enabled`\nentitlement; callers without them receive `403`.\n", "tags": [ "Search" ], diff --git a/packages/api-core/src/openapi/operations.generated.ts b/packages/api-core/src/openapi/operations.generated.ts index 40b0e979..dc6198ad 100644 --- a/packages/api-core/src/openapi/operations.generated.ts +++ b/packages/api-core/src/openapi/operations.generated.ts @@ -10281,7 +10281,7 @@ export const operationManifest: PrimitiveOperationManifest[] = [ "binaryResponse": false, "bodyRequired": true, "command": "semantic-search", - "description": "Ranked search across both received and sent mail. The `mode`\nfield selects the ranking strategy:\n\n- `keyword`: lexical full-text matching only (no embeddings).\n- `semantic`: meaning-based matching using vector embeddings.\n- `hybrid` (default): blends the semantic and keyword signals.\n\nResults are ordered by a relevance `score`. Every row reports the\nfields it matched (`matched_fields`), a match-centered excerpt per\nfield (`snippets`), and a `score_breakdown` whose components account\nfor the `score`. Page through results by passing the prior\nresponse's `meta.cursor` back as `cursor`.\n\nRequires the Pro plan and the `semantic_search_enabled`\nentitlement; callers without them receive `403`.\n\nHost routing: this operation is served only by the search host\n(`https://api.primitive.dev/v1`). The typed SDKs route it there\nautomatically.\n", + "description": "Ranked search across both received and sent mail. The `mode`\nfield selects the ranking strategy:\n\n- `keyword`: lexical full-text matching only (no embeddings).\n- `semantic`: meaning-based matching using vector embeddings.\n- `hybrid` (default): blends the semantic and keyword signals.\n\nResults are ordered by a relevance `score`. Every row reports the\nfields it matched (`matched_fields`), a match-centered excerpt per\nfield (`snippets`), and a `score_breakdown` whose components account\nfor the `score`. Page through results by passing the prior\nresponse's `meta.cursor` back as `cursor`.\n\nRequires the Pro plan and the `semantic_search_enabled`\nentitlement; callers without them receive `403`.\n", "hasJsonBody": true, "method": "POST", "operationId": "semanticSearch", From 1a7d7bc787820b258b9f11e987ca47f623da9153 Mon Sep 17 00:00:00 2001 From: Ethan Byrd Date: Sun, 19 Jul 2026 13:05:10 -0700 Subject: [PATCH 2/2] Regenerate Go and Python artifacts for the semantic-search doc change --- sdk-go/api/oas_client_gen.go | 6 ------ sdk-go/api/oas_handlers_gen.go | 3 --- sdk-go/api/oas_server_gen.go | 3 --- sdk-go/api/oas_unimplemented_gen.go | 3 --- .../primitive/api/api/search/semantic_search.py | 16 ---------------- 5 files changed, 31 deletions(-) diff --git a/sdk-go/api/oas_client_gen.go b/sdk-go/api/oas_client_gen.go index 1510ab71..184861b9 100644 --- a/sdk-go/api/oas_client_gen.go +++ b/sdk-go/api/oas_client_gen.go @@ -945,9 +945,6 @@ type Invoker interface { // response's `meta.cursor` back as `cursor`. // Requires the Pro plan and the `semantic_search_enabled` // entitlement; callers without them receive `403`. - // Host routing: this operation is served only by the search host - // (`https://api.primitive.dev/v1`). The typed SDKs route it there - // automatically. // // POST /semantic-search SemanticSearch(ctx context.Context, request *SemanticSearchInput) (SemanticSearchRes, error) @@ -13208,9 +13205,6 @@ func (c *Client) sendSearchMemories(ctx context.Context, params SearchMemoriesPa // response's `meta.cursor` back as `cursor`. // Requires the Pro plan and the `semantic_search_enabled` // entitlement; callers without them receive `403`. -// Host routing: this operation is served only by the search host -// (`https://api.primitive.dev/v1`). The typed SDKs route it there -// automatically. // // POST /semantic-search func (c *Client) SemanticSearch(ctx context.Context, request *SemanticSearchInput) (SemanticSearchRes, error) { diff --git a/sdk-go/api/oas_handlers_gen.go b/sdk-go/api/oas_handlers_gen.go index 7559ba1a..d038eec0 100644 --- a/sdk-go/api/oas_handlers_gen.go +++ b/sdk-go/api/oas_handlers_gen.go @@ -16935,9 +16935,6 @@ func (s *Server) handleSearchMemoriesRequest(args [0]string, argsEscaped bool, w // response's `meta.cursor` back as `cursor`. // Requires the Pro plan and the `semantic_search_enabled` // entitlement; callers without them receive `403`. -// Host routing: this operation is served only by the search host -// (`https://api.primitive.dev/v1`). The typed SDKs route it there -// automatically. // // POST /semantic-search func (s *Server) handleSemanticSearchRequest(args [0]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { diff --git a/sdk-go/api/oas_server_gen.go b/sdk-go/api/oas_server_gen.go index 1ccf384b..be98ec63 100644 --- a/sdk-go/api/oas_server_gen.go +++ b/sdk-go/api/oas_server_gen.go @@ -925,9 +925,6 @@ type Handler interface { // response's `meta.cursor` back as `cursor`. // Requires the Pro plan and the `semantic_search_enabled` // entitlement; callers without them receive `403`. - // Host routing: this operation is served only by the search host - // (`https://api.primitive.dev/v1`). The typed SDKs route it there - // automatically. // // POST /semantic-search SemanticSearch(ctx context.Context, req *SemanticSearchInput) (SemanticSearchRes, error) diff --git a/sdk-go/api/oas_unimplemented_gen.go b/sdk-go/api/oas_unimplemented_gen.go index 81549a1c..c52eedc8 100644 --- a/sdk-go/api/oas_unimplemented_gen.go +++ b/sdk-go/api/oas_unimplemented_gen.go @@ -1200,9 +1200,6 @@ func (UnimplementedHandler) SearchMemories(ctx context.Context, params SearchMem // response's `meta.cursor` back as `cursor`. // Requires the Pro plan and the `semantic_search_enabled` // entitlement; callers without them receive `403`. -// Host routing: this operation is served only by the search host -// (`https://api.primitive.dev/v1`). The typed SDKs route it there -// automatically. // // POST /semantic-search func (UnimplementedHandler) SemanticSearch(ctx context.Context, req *SemanticSearchInput) (r SemanticSearchRes, _ error) { diff --git a/sdk-python/src/primitive/api/api/search/semantic_search.py b/sdk-python/src/primitive/api/api/search/semantic_search.py index 6b76bbe9..97a47dcd 100644 --- a/sdk-python/src/primitive/api/api/search/semantic_search.py +++ b/sdk-python/src/primitive/api/api/search/semantic_search.py @@ -131,10 +131,6 @@ def sync_detailed( Requires the Pro plan and the `semantic_search_enabled` entitlement; callers without them receive `403`. - Host routing: this operation is served only by the search host - (`https://api.primitive.dev/v1`). The typed SDKs route it there - automatically. - Args: body (SemanticSearchInput): @@ -182,10 +178,6 @@ def sync( Requires the Pro plan and the `semantic_search_enabled` entitlement; callers without them receive `403`. - Host routing: this operation is served only by the search host - (`https://api.primitive.dev/v1`). The typed SDKs route it there - automatically. - Args: body (SemanticSearchInput): @@ -228,10 +220,6 @@ async def asyncio_detailed( Requires the Pro plan and the `semantic_search_enabled` entitlement; callers without them receive `403`. - Host routing: this operation is served only by the search host - (`https://api.primitive.dev/v1`). The typed SDKs route it there - automatically. - Args: body (SemanticSearchInput): @@ -279,10 +267,6 @@ async def asyncio( Requires the Pro plan and the `semantic_search_enabled` entitlement; callers without them receive `403`. - Host routing: this operation is served only by the search host - (`https://api.primitive.dev/v1`). The typed SDKs route it there - automatically. - Args: body (SemanticSearchInput):