Skip to content

Commit efec3a4

Browse files
committed
don't consider a task if all models are staging
1 parent 78a29d6 commit efec3a4

File tree

3 files changed

+9
-18
lines changed

3 files changed

+9
-18
lines changed

docs/inference-providers/providers/replicate.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,6 @@ Replicate is building tools so all software engineers can use AI as if it were n
3838
## Supported tasks
3939

4040

41-
### Automatic Speech Recognition
42-
43-
Find out more about Automatic Speech Recognition [here](../tasks/automatic_speech_recognition).
44-
45-
<InferenceSnippet
46-
pipeline=automatic-speech-recognition
47-
providersMapping={ {"replicate":{"modelId":"openai/whisper-large-v3","providerModelId":"openai/whisper"} } }
48-
/>
49-
50-
5141
### Image To Image
5242

5343
Find out more about Image To Image [here](../tasks/image_to_image).

docs/inference-providers/tasks/automatic-speech-recognition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Explore all available models and find the one that suits you best [here](https:/
3838

3939
<InferenceSnippet
4040
pipeline=automatic-speech-recognition
41-
providersMapping={ {"fal-ai":{"modelId":"openai/whisper-large-v3","providerModelId":"fal-ai/whisper"},"hf-inference":{"modelId":"openai/whisper-large-v3","providerModelId":"openai/whisper-large-v3"},"replicate":{"modelId":"openai/whisper-large-v3","providerModelId":"openai/whisper"}} }
41+
providersMapping={ {"fal-ai":{"modelId":"openai/whisper-large-v3","providerModelId":"fal-ai/whisper"},"hf-inference":{"modelId":"openai/whisper-large-v3","providerModelId":"openai/whisper-large-v3"}} }
4242
/>
4343

4444

scripts/inference-providers/scripts/generate.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,15 @@ await Promise.all(
120120
>;
121121

122122
for (const [task, models] of Object.entries(mapping)) {
123-
for (const [modelId, modelMapping] of Object.entries(models)) {
124-
if (modelMapping.status == "live") {
125-
if (!PER_TASK_SUPPORTED_PROVIDERS[task]) {
126-
PER_TASK_SUPPORTED_PROVIDERS[task] = [];
127-
}
128-
PER_TASK_SUPPORTED_PROVIDERS[task].push(provider);
129-
break;
123+
const hasLiveModel = Object.values(models).some(
124+
(model) => model.status === "live",
125+
);
126+
127+
if (hasLiveModel) {
128+
if (!PER_TASK_SUPPORTED_PROVIDERS[task]) {
129+
PER_TASK_SUPPORTED_PROVIDERS[task] = [];
130130
}
131+
PER_TASK_SUPPORTED_PROVIDERS[task].push(provider);
131132
}
132133
}
133134
}),

0 commit comments

Comments
 (0)