feat: enhance provider settings and model configuration
- Updated `ModelConfig` to include a `mode` property for better differentiation between 'chat' and 'responses'. - Modified `createBaseModel` to conditionally set the provider based on the new `mode` property in `providerSettings`. - Refactored `RuntimeExecutor` to utilize the updated `ModelConfig` for improved type safety and clarity in provider settings. - Adjusted imports in `executor.ts` and `types.ts` to align with the new model configuration structure.
This commit is contained in:
@@ -71,14 +71,16 @@ function providerToAiSdkConfig(actualProvider: Provider): {
|
||||
const openaiResponseOptions =
|
||||
actualProviderId === 'openai'
|
||||
? {
|
||||
compatibility: 'strict'
|
||||
mode: 'response'
|
||||
}
|
||||
: aiSdkProviderId === 'openai'
|
||||
? {
|
||||
compatibility: 'compatible'
|
||||
mode: 'chat'
|
||||
}
|
||||
: undefined
|
||||
|
||||
console.log('openaiResponseOptions', openaiResponseOptions)
|
||||
console.log('actualProvider', actualProvider)
|
||||
console.log('aiSdkProviderId', aiSdkProviderId)
|
||||
if (AiCore.isSupported(aiSdkProviderId) && aiSdkProviderId !== 'openai-compatible') {
|
||||
const options = ProviderConfigFactory.fromProvider(
|
||||
aiSdkProviderId,
|
||||
|
||||
Reference in New Issue
Block a user