Skip to content

Commit 8e2ed5e

Browse files
authored
fix(integrations): hide retired hugging face providers, encode posthog ids, and trim zep final ids (#10190)
1 parent 06db09b commit 8e2ed5e

56 files changed

Lines changed: 201 additions & 136 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/docs/content/docs/integrations/huggingface.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import { ReferenceDetails } from "@/components/ui/reference-details"
1111

1212
{/* MANUAL-CONTENT-START:intro */}
1313
Use [Hugging Face](https://huggingface.co/) in Sim to generate text completions with the Hugging Face Inference API. Choose a model and supply the prompt for the workflow step.
14+
15+
The **Provider** list shows the providers that serve chat completions through the Hugging Face router: Novita, Cerebras, Cohere, Fireworks, HF Inference, Nscale and Together. Fal AI, Hyperbolic, Nebius, Replicate and SambaNova are no longer listed because Hugging Face does not route chat completions to them. A block that already uses one of them keeps its saved setting.
1416
{/* MANUAL-CONTENT-END */}
1517

1618
## Use the block [#usage-instructions]

‎apps/sim/blocks/blocks/huggingface.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,19 @@ export const HuggingFaceBlock: BlockConfig = {
4747
title: 'Provider',
4848
type: 'dropdown',
4949
required: true,
50+
// Hidden providers have no chat-completions route in @huggingface/inference; kept so saved workflows still validate.
5051
options: [
5152
{ label: 'Novita', id: 'novita' },
5253
{ label: 'Cerebras', id: 'cerebras' },
5354
{ label: 'Cohere', id: 'cohere' },
54-
{ label: 'Fal AI', id: 'fal' },
55+
{ label: 'Fal AI', id: 'fal', hidden: true },
5556
{ label: 'Fireworks', id: 'fireworks' },
56-
{ label: 'Hyperbolic', id: 'hyperbolic' },
57+
{ label: 'Hyperbolic', id: 'hyperbolic', hidden: true },
5758
{ label: 'HF Inference', id: 'hf-inference' },
58-
{ label: 'Nebius', id: 'nebius' },
59+
{ label: 'Nebius', id: 'nebius', hidden: true },
5960
{ label: 'Nscale', id: 'nscale' },
60-
{ label: 'Replicate', id: 'replicate' },
61-
{ label: 'SambaNova', id: 'sambanova' },
61+
{ label: 'Replicate', id: 'replicate', hidden: true },
62+
{ label: 'SambaNova', id: 'sambanova', hidden: true },
6263
{ label: 'Together', id: 'together' },
6364
],
6465
value: () => 'novita',

‎apps/sim/components/settings/navigation.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ export const SETTINGS_SECTION_REGISTRY: readonly SettingsSectionRegistryEntry[]
370370
requiresDesktopSurface: 'settings',
371371
},
372372
/** Device settings, not workspace data, so surfaces without a workspace host them too. */
373-
planes: { account: { id: 'desktop', group: 'account', order: 1 } },
373+
planes: { account: { id: 'desktop', group: 'account', order: 2 } },
374374
},
375375
{
376376
label: 'Browser',

‎apps/sim/tools/posthog/create_annotation.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
1+
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
22
import type { ToolConfig } from '@/tools/types'
33

44
interface PostHogCreateAnnotationParams {
@@ -108,7 +108,7 @@ export const createAnnotationTool: ToolConfig<
108108
request: {
109109
url: (params) => {
110110
const baseUrl = getPostHogAppBaseUrl(params.region as 'us' | 'eu' | undefined, params.host)
111-
return `${baseUrl}/api/projects/${params.projectId}/annotations/`
111+
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/annotations/`
112112
},
113113
method: 'POST',
114114
headers: (params) => ({

‎apps/sim/tools/posthog/create_cohort.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
1+
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
22
import type { ToolConfig } from '@/tools/types'
33

44
interface PostHogCreateCohortParams {
@@ -112,7 +112,7 @@ export const createCohortTool: ToolConfig<PostHogCreateCohortParams, PostHogCrea
112112
request: {
113113
url: (params) => {
114114
const baseUrl = getPostHogAppBaseUrl(params.region as 'us' | 'eu' | undefined, params.host)
115-
return `${baseUrl}/api/projects/${params.projectId}/cohorts/`
115+
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/cohorts/`
116116
},
117117
method: 'POST',
118118
headers: (params) => ({

‎apps/sim/tools/posthog/create_dashboard.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
1+
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
22
import type { ToolConfig } from '@/tools/types'
33

44
interface PostHogCreateDashboardParams {
@@ -101,7 +101,7 @@ export const createDashboardTool: ToolConfig<
101101
request: {
102102
url: (params) => {
103103
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
104-
return `${baseUrl}/api/projects/${params.projectId}/dashboards/`
104+
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/dashboards/`
105105
},
106106
method: 'POST',
107107
headers: (params) => ({

‎apps/sim/tools/posthog/create_experiment.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getErrorMessage } from '@sim/utils/errors'
2-
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
2+
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
33
import type { ToolConfig, ToolResponse } from '@/tools/types'
44

55
interface CreateExperimentParams {
@@ -118,7 +118,7 @@ export const createExperimentTool: ToolConfig<
118118
request: {
119119
url: (params) => {
120120
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
121-
return `${baseUrl}/api/projects/${params.projectId}/experiments/`
121+
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/experiments/`
122122
},
123123
method: 'POST',
124124
headers: (params) => ({

‎apps/sim/tools/posthog/create_feature_flag.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getErrorMessage } from '@sim/utils/errors'
2-
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
2+
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
33
import type { ToolConfig, ToolResponse } from '@/tools/types'
44

55
interface CreateFeatureFlagParams {
@@ -128,7 +128,7 @@ export const createFeatureFlagTool: ToolConfig<
128128
request: {
129129
url: (params) => {
130130
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
131-
return `${baseUrl}/api/projects/${params.projectId}/feature_flags/`
131+
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/feature_flags/`
132132
},
133133
method: 'POST',
134134
headers: (params) => ({

‎apps/sim/tools/posthog/create_insight.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
1+
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
22
import type { ToolConfig } from '@/tools/types'
33

44
interface PostHogCreateInsightParams {
@@ -101,7 +101,7 @@ export const createInsightTool: ToolConfig<
101101
request: {
102102
url: (params) => {
103103
const baseUrl = getPostHogAppBaseUrl(params.region as 'us' | 'eu' | undefined, params.host)
104-
return `${baseUrl}/api/projects/${params.projectId}/insights/`
104+
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/insights/`
105105
},
106106
method: 'POST',
107107
headers: (params) => ({

‎apps/sim/tools/posthog/create_survey.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
1+
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
22
import type { ToolConfig } from '@/tools/types'
33

44
interface PostHogSurveyQuestion {
@@ -165,7 +165,7 @@ export const createSurveyTool: ToolConfig<PostHogCreateSurveyParams, PostHogCrea
165165
request: {
166166
url: (params) => {
167167
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
168-
return `${baseUrl}/api/projects/${params.projectId}/surveys/`
168+
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/surveys/`
169169
},
170170
method: 'POST',
171171
headers: (params) => ({

0 commit comments

Comments
 (0)