Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/docs/content/docs/integrations/huggingface.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { ReferenceDetails } from "@/components/ui/reference-details"

{/* MANUAL-CONTENT-START:intro */}
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.

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.
{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]
Expand Down
11 changes: 6 additions & 5 deletions apps/sim/blocks/blocks/huggingface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,19 @@ export const HuggingFaceBlock: BlockConfig = {
title: 'Provider',
type: 'dropdown',
required: true,
// Hidden providers have no chat-completions route in @huggingface/inference; kept so saved workflows still validate.
options: [
{ label: 'Novita', id: 'novita' },
{ label: 'Cerebras', id: 'cerebras' },
{ label: 'Cohere', id: 'cohere' },
{ label: 'Fal AI', id: 'fal' },
{ label: 'Fal AI', id: 'fal', hidden: true },
{ label: 'Fireworks', id: 'fireworks' },
{ label: 'Hyperbolic', id: 'hyperbolic' },
{ label: 'Hyperbolic', id: 'hyperbolic', hidden: true },
{ label: 'HF Inference', id: 'hf-inference' },
{ label: 'Nebius', id: 'nebius' },
{ label: 'Nebius', id: 'nebius', hidden: true },
{ label: 'Nscale', id: 'nscale' },
{ label: 'Replicate', id: 'replicate' },
{ label: 'SambaNova', id: 'sambanova' },
{ label: 'Replicate', id: 'replicate', hidden: true },
{ label: 'SambaNova', id: 'sambanova', hidden: true },
{ label: 'Together', id: 'together' },
],
value: () => 'novita',
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/components/settings/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export const SETTINGS_SECTION_REGISTRY: readonly SettingsSectionRegistryEntry[]
requiresDesktopSurface: 'settings',
},
/** Device settings, not workspace data, so surfaces without a workspace host them too. */
planes: { account: { id: 'desktop', group: 'account', order: 1 } },
planes: { account: { id: 'desktop', group: 'account', order: 2 } },
},
{
label: 'Browser',
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/create_annotation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

interface PostHogCreateAnnotationParams {
Expand Down Expand Up @@ -108,7 +108,7 @@ export const createAnnotationTool: ToolConfig<
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region as 'us' | 'eu' | undefined, params.host)
return `${baseUrl}/api/projects/${params.projectId}/annotations/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/annotations/`
},
method: 'POST',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/create_cohort.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

interface PostHogCreateCohortParams {
Expand Down Expand Up @@ -112,7 +112,7 @@ export const createCohortTool: ToolConfig<PostHogCreateCohortParams, PostHogCrea
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region as 'us' | 'eu' | undefined, params.host)
return `${baseUrl}/api/projects/${params.projectId}/cohorts/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/cohorts/`
},
method: 'POST',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/create_dashboard.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

interface PostHogCreateDashboardParams {
Expand Down Expand Up @@ -101,7 +101,7 @@ export const createDashboardTool: ToolConfig<
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/projects/${params.projectId}/dashboards/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/dashboards/`
},
method: 'POST',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/create_experiment.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getErrorMessage } from '@sim/utils/errors'
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig, ToolResponse } from '@/tools/types'

interface CreateExperimentParams {
Expand Down Expand Up @@ -118,7 +118,7 @@ export const createExperimentTool: ToolConfig<
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/projects/${params.projectId}/experiments/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/experiments/`
},
method: 'POST',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/create_feature_flag.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getErrorMessage } from '@sim/utils/errors'
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig, ToolResponse } from '@/tools/types'

interface CreateFeatureFlagParams {
Expand Down Expand Up @@ -128,7 +128,7 @@ export const createFeatureFlagTool: ToolConfig<
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/projects/${params.projectId}/feature_flags/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/feature_flags/`
},
method: 'POST',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/create_insight.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

interface PostHogCreateInsightParams {
Expand Down Expand Up @@ -101,7 +101,7 @@ export const createInsightTool: ToolConfig<
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region as 'us' | 'eu' | undefined, params.host)
return `${baseUrl}/api/projects/${params.projectId}/insights/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/insights/`
},
method: 'POST',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/create_survey.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

interface PostHogSurveyQuestion {
Expand Down Expand Up @@ -165,7 +165,7 @@ export const createSurveyTool: ToolConfig<PostHogCreateSurveyParams, PostHogCrea
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/projects/${params.projectId}/surveys/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/surveys/`
},
method: 'POST',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/delete_feature_flag.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig, ToolResponse } from '@/tools/types'

interface DeleteFeatureFlagParams {
Expand Down Expand Up @@ -61,7 +61,7 @@ export const deleteFeatureFlagTool: ToolConfig<DeleteFeatureFlagParams, DeleteFe
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/projects/${params.projectId}/feature_flags/${params.flagId}/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/feature_flags/${postHogPathSegment(params.flagId, 'flagId')}/`
},
// PostHog does not allow a hard DELETE on feature flags (always returns 405).
// Deletion is a soft-delete via PATCH with deleted: true.
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/delete_person.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

export interface PostHogDeletePersonParams {
Expand Down Expand Up @@ -65,7 +65,7 @@ export const deletePersonTool: ToolConfig<PostHogDeletePersonParams, PostHogDele
// via the bulk_delete endpoint, called here with a single ID.
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/projects/${params.projectId}/persons/bulk_delete/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/persons/bulk_delete/`
},
method: 'POST',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/delete_survey.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

interface PostHogDeleteSurveyParams {
Expand Down Expand Up @@ -62,7 +62,7 @@ export const deleteSurveyTool: ToolConfig<PostHogDeleteSurveyParams, PostHogDele
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/projects/${params.projectId}/surveys/${params.surveyId}/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/surveys/${postHogPathSegment(params.surveyId, 'surveyId')}/`
},
method: 'DELETE',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/get_cohort.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

interface PostHogGetCohortParams {
Expand Down Expand Up @@ -76,7 +76,7 @@ export const getCohortTool: ToolConfig<PostHogGetCohortParams, PostHogGetCohortR
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region as 'us' | 'eu' | undefined, params.host)
return `${baseUrl}/api/projects/${params.projectId}/cohorts/${params.cohortId}/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/cohorts/${postHogPathSegment(params.cohortId, 'cohortId')}/`
},
method: 'GET',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/get_dashboard.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

interface PostHogGetDashboardParams {
Expand Down Expand Up @@ -74,7 +74,7 @@ export const getDashboardTool: ToolConfig<PostHogGetDashboardParams, PostHogGetD
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region as 'us' | 'eu' | undefined, params.host)
return `${baseUrl}/api/projects/${params.projectId}/dashboards/${params.dashboardId}/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/dashboards/${postHogPathSegment(params.dashboardId, 'dashboardId')}/`
},
method: 'GET',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/get_event_definition.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig, ToolResponse } from '@/tools/types'

interface PostHogGetEventDefinitionParams {
Expand Down Expand Up @@ -77,7 +77,7 @@ export const getEventDefinitionTool: ToolConfig<
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/projects/${params.projectId}/event_definitions/${params.eventDefinitionId}`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/event_definitions/${postHogPathSegment(params.eventDefinitionId, 'eventDefinitionId')}`
},
method: 'GET',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/get_experiment.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig, ToolResponse } from '@/tools/types'

interface GetExperimentParams {
Expand Down Expand Up @@ -77,7 +77,7 @@ export const getExperimentTool: ToolConfig<
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/projects/${params.projectId}/experiments/${params.experimentId}/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/experiments/${postHogPathSegment(params.experimentId, 'experimentId')}/`
},
method: 'GET',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/get_feature_flag.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig, ToolResponse } from '@/tools/types'

interface GetFeatureFlagParams {
Expand Down Expand Up @@ -76,7 +76,7 @@ export const getFeatureFlagTool: ToolConfig<
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/projects/${params.projectId}/feature_flags/${params.flagId}/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/feature_flags/${postHogPathSegment(params.flagId, 'flagId')}/`
},
method: 'GET',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/get_insight.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

interface PostHogGetInsightParams {
Expand Down Expand Up @@ -72,7 +72,7 @@ export const getInsightTool: ToolConfig<PostHogGetInsightParams, PostHogGetInsig
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region as 'us' | 'eu' | undefined, params.host)
return `${baseUrl}/api/projects/${params.projectId}/insights/${params.insightId}/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/insights/${postHogPathSegment(params.insightId, 'insightId')}/`
},
method: 'GET',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/get_organization.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

export interface PostHogGetOrganizationParams {
Expand Down Expand Up @@ -83,7 +83,7 @@ export const getOrganizationTool: ToolConfig<
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/organizations/${params.organizationId}/`
return `${baseUrl}/api/organizations/${postHogPathSegment(params.organizationId, 'organizationId')}/`
},
method: 'GET',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/get_person.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

export interface PostHogGetPersonParams {
Expand Down Expand Up @@ -68,7 +68,7 @@ export const getPersonTool: ToolConfig<PostHogGetPersonParams, PostHogGetPersonR
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/projects/${params.projectId}/persons/${params.personId}/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/persons/${postHogPathSegment(params.personId, 'personId')}/`
},
method: 'GET',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/get_project.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

export interface PostHogGetProjectParams {
Expand Down Expand Up @@ -84,7 +84,7 @@ export const getProjectTool: ToolConfig<PostHogGetProjectParams, PostHogGetProje
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/projects/${params.projectId}/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/`
},
method: 'GET',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/get_property_definition.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig, ToolResponse } from '@/tools/types'

interface PostHogGetPropertyDefinitionParams {
Expand Down Expand Up @@ -80,7 +80,7 @@ export const getPropertyDefinitionTool: ToolConfig<
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/projects/${params.projectId}/property_definitions/${params.propertyDefinitionId}`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/property_definitions/${postHogPathSegment(params.propertyDefinitionId, 'propertyDefinitionId')}`
},
method: 'GET',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/get_session_recording.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

interface PostHogGetSessionRecordingParams {
Expand Down Expand Up @@ -87,7 +87,7 @@ export const getSessionRecordingTool: ToolConfig<
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/projects/${params.projectId}/session_recordings/${params.recordingId}/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/session_recordings/${postHogPathSegment(params.recordingId, 'recordingId')}/`
},
method: 'GET',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/get_survey.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

interface PostHogGetSurveyParams {
Expand Down Expand Up @@ -90,7 +90,7 @@ export const getSurveyTool: ToolConfig<PostHogGetSurveyParams, PostHogGetSurveyR
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region, params.host)
return `${baseUrl}/api/projects/${params.projectId}/surveys/${params.surveyId}/`
return `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/surveys/${postHogPathSegment(params.surveyId, 'surveyId')}/`
},
method: 'GET',
headers: (params) => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/tools/posthog/list_actions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPostHogAppBaseUrl } from '@/tools/posthog/utils'
import { getPostHogAppBaseUrl, postHogPathSegment } from '@/tools/posthog/utils'
import type { ToolConfig } from '@/tools/types'

interface PostHogListActionsParams {
Expand Down Expand Up @@ -92,7 +92,7 @@ export const listActionsTool: ToolConfig<PostHogListActionsParams, PostHogListAc
request: {
url: (params) => {
const baseUrl = getPostHogAppBaseUrl(params.region as 'us' | 'eu' | undefined, params.host)
let url = `${baseUrl}/api/projects/${params.projectId}/actions/`
let url = `${baseUrl}/api/projects/${postHogPathSegment(params.projectId, 'projectId')}/actions/`

const queryParams = []
if (params.limit) queryParams.push(`limit=${params.limit}`)
Expand Down
Loading
Loading