Skip to content

Commit dcbb6c9

Browse files
committed
More progress
1 parent 520dec0 commit dcbb6c9

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

packages/types/src/provider-settings.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -536,10 +536,16 @@ export const getModelId = (settings: ProviderSettings): string | undefined => {
536536
return modelIdKey ? settings[modelIdKey] : undefined
537537
}
538538

539-
export const modelIdKeysByProvider: Record<
540-
Exclude<ProviderName, InternalProvider | CustomProvider | FauxProvider>,
541-
ModelIdKey
542-
> = {
539+
/**
540+
* TypicalProvider
541+
*/
542+
543+
export type TypicalProvider = Exclude<ProviderName, InternalProvider | CustomProvider | FauxProvider>
544+
545+
export const isTypicalProvider = (key: unknown): key is TypicalProvider =>
546+
isProviderName(key) && !isInternalProvider(key) && !isCustomProvider(key) && !isFauxProvider(key)
547+
548+
export const modelIdKeysByProvider: Record<TypicalProvider, ModelIdKey> = {
543549
anthropic: "apiModelId",
544550
"claude-code": "apiModelId",
545551
glama: "glamaModelId",

0 commit comments

Comments
 (0)