@@ -109,17 +109,12 @@ def ldai_client(client: LDClient) -> LDAIClient:
109109
110110
111111def test_model_config_delegates_to_properties ():
112- model = ModelConfig ('fakeModel' , temperature = 0.5 , max_tokens = 4096 , attributes = {'extra-attribute' : 'value' })
112+ model = ModelConfig ('fakeModel' , parameters = {'extra-attribute' : 'value' })
113113 assert model .id == 'fakeModel'
114- assert model .temperature == 0.5
115- assert model .max_tokens == 4096
116- assert model .get_attribute ('extra-attribute' ) == 'value'
117- assert model .get_attribute ('non-existent' ) is None
114+ assert model .get_parameter ('extra-attribute' ) == 'value'
115+ assert model .get_parameter ('non-existent' ) is None
118116
119- assert model .id == model .get_attribute ('id' )
120- assert model .temperature == model .get_attribute ('temperature' )
121- assert model .max_tokens == model .get_attribute ('maxTokens' )
122- assert model .max_tokens != model .get_attribute ('max_tokens' )
117+ assert model .id == model .get_parameter ('id' )
123118
124119
125120def test_model_config_interpolation (ldai_client : LDAIClient , tracker ):
@@ -141,8 +136,8 @@ def test_model_config_interpolation(ldai_client: LDAIClient, tracker):
141136
142137 assert config .model is not None
143138 assert config .model .id == 'fakeModel'
144- assert config .model .temperature == 0.5
145- assert config .model .max_tokens == 4096
139+ assert config .model .get_parameter ( ' temperature' ) == 0.5
140+ assert config .model .get_parameter ( 'maxTokens' ) == 4096
146141
147142
148143def test_model_config_no_variables (ldai_client : LDAIClient , tracker ):
@@ -158,8 +153,8 @@ def test_model_config_no_variables(ldai_client: LDAIClient, tracker):
158153
159154 assert config .model is not None
160155 assert config .model .id == 'fakeModel'
161- assert config .model .temperature == 0.5
162- assert config .model .max_tokens == 4096
156+ assert config .model .get_parameter ( ' temperature' ) == 0.5
157+ assert config .model .get_parameter ( 'maxTokens' ) == 4096
163158
164159
165160def test_provider_config_handling (ldai_client : LDAIClient , tracker ):
@@ -189,9 +184,9 @@ def test_context_interpolation(ldai_client: LDAIClient, tracker):
189184
190185 assert config .model is not None
191186 assert config .model .id == 'fakeModel'
192- assert config .model .temperature is None
193- assert config .model .max_tokens is None
194- assert config .model .get_attribute ('extra-attribute' ) == 'I can be anything I set my mind/type to'
187+ assert config .model .get_parameter ( ' temperature' ) is None
188+ assert config .model .get_parameter ( 'maxTokens' ) is None
189+ assert config .model .get_parameter ('extra-attribute' ) == 'I can be anything I set my mind/type to'
195190
196191
197192def test_model_config_multiple (ldai_client : LDAIClient , tracker ):
@@ -211,8 +206,8 @@ def test_model_config_multiple(ldai_client: LDAIClient, tracker):
211206
212207 assert config .model is not None
213208 assert config .model .id == 'fakeModel'
214- assert config .model .temperature == 0.7
215- assert config .model .max_tokens == 8192
209+ assert config .model .get_parameter ( ' temperature' ) == 0.7
210+ assert config .model .get_parameter ( 'maxTokens' ) == 8192
216211
217212
218213def test_model_config_disabled (ldai_client : LDAIClient , tracker ):
@@ -224,8 +219,8 @@ def test_model_config_disabled(ldai_client: LDAIClient, tracker):
224219 assert config .model is not None
225220 assert config .enabled is False
226221 assert config .model .id == 'fakeModel'
227- assert config .model .temperature == 0.1
228- assert config .model .max_tokens is None
222+ assert config .model .get_parameter ( ' temperature' ) == 0.1
223+ assert config .model .get_parameter ( 'maxTokens' ) is None
229224
230225
231226def test_model_initial_config_disabled (ldai_client : LDAIClient , tracker ):
0 commit comments