discourse-ai/db/migrate/20240807150605_add_default_to_provider_params.rb
Roman Rizzi 20efc9285e
FIX: Correctly save provider-specific params for new models. (#744)
Creating a new model, either manually or from presets, doesn't initialize the `provider_params` object, meaning their custom params won't persist.

Additionally, this change adds some validations for Bedrock params, which are mandatory, and a clear message when a completion fails because we cannot build the URL.
2024-08-07 16:08:56 -03:00

7 lines
192 B
Ruby

# frozen_string_literal: true
class AddDefaultToProviderParams < ActiveRecord::Migration[7.1]
def change
change_column_default :llm_models, :provider_params, from: nil, to: {}
end
end